All pastes #469759 Raw Edit

Someone

public cpp v1 · immutable
·published 2007-05-03 21:53 UTC
rendered paste body
Error: struct nodeStack has no member named 'riderName'  ... riderPhone... rider....class stack{    public:        stack();        ~stack();                /*Functions*/        int push(char* rideName, char* ridePhone, char* timeDay, char* tTime); //Push information onto the stack        int pop(); //Pop information off of the stack        int peek(); //Peek into the contents of the stack        int isempty(); //Checks if the stack is empty (?needed?)        int isfull(); //Checks if the stack is full (?needed?)        int destroy(); //Destroy all the linked list nodes.    private:        /*Private Nodes*/        nodeStack * top; //Head of the linked list ~ push/pop        nodeStack * current;        nodeStack * riderName;        nodeStack * riderPhone;        nodeStack * tripTime;        nodeStack * timeOfDay;        nodeStack * riderCount;};----------------------------------------------------------------int stack::push(char* rideName, char* ridePhone, char* timeDay, char* tTime){    nodeStack * temp;        current                  = new nodeStack;	current->riderName       = new char[strlen(rideName) + 1];	current->riderPhone      = new char[strlen(ridePhone) + 1];	current->timeOfDay       = new char[strlen(timeDay) + 1];	current->tripTime        = new char[strlen(tTime) + 1];	    strcpy(current->riderName   , riderName);    strcpy(current->riderPhone  , riderPhone);    strcpy(current->timeOfDay   , timeOfDay);    strcpy(current->tripTime    , tripTime);        if(!head)    {		head = current;	}	    else     {        temp            = current;        current         = new nodeStack; //Make a new rider        current->next   = temp; //Current is now top of stack    }        /*Just let the application know everything went well */	return 1;}