Assume the following specification of a node of linked structure and the class
// LinkedStructure And the class.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
using namespace std;
struct Node{
int info;
struct Node *next;
};
typedef struct Node * NODEPTR ;
NODEPTR listptr;
class linkStr{
private :
NODEPTR ptr;
linkStr(){
ptr=0;
}
~linkStr();
//creat a likend structure of length pointed to by ptr
//the value of info part are input from the keyboard
void makeStr(int len);
//Display all the element of linked structure pointed to by ptr on the secreen
void DisplayStr();
//remove the first elmet of liked structure pointed to by ptr
void removeFirst();
//remove the last elmet of liked structure pointed to by ptr
void removeLast();
//Remove the first elemetn of liked structure with an info feild equal to k.
//if no info element or the lisst is empty ,Do nothing
void remove(int k);
bool IsEmpty(){
return (ptr==0);
}
};
linkStr::~linkStr(){
NODEPTR p,q;
if(IsEmpty())
exit(1);
for (p=ptr ,q=p->next ; p!=0 ; p=q, q=p->next)
delete p;
}
void linkStr::makeStr(int len){
NODEPTR p,q;
for (int i=0;i<len;i++){
int value;
cin>>value;
q = new Node;
q->info=value;
q->next=p->next;
p->next=q;
}
}
void linkStr::removeFirst(){
NODEPTR p ,q;
p=listptr;
if (p==0){
cout<<"Error";
}
else
q->next=p->next;
delete p;
}
void linkStr::removeLast(){
NODEPTR p,q;
}
}
/*Write a driver program for the implementation of the class LinkStr;*/
Any one plxx help me to write the Function
void linkStr::makeStr(int len);
help me please