My question is: I have a struct which is called Pet. data members name,type,age and a pointer variable nextPet.
I must write a function that dynamically creats a new node for a Pet object. The function should ask to user to enter in the information for all data members of the node, and assign NULL to the nextPet data member. I wrote but it gives a error.
here is the program...
int main( )
cout<<"please write name"<<endl
cout<<"please write animal type"<<endl;
cout<<"please write age<<endl;