since this is a c++ program, use std::string instead of char arrays. std::string is a lot easier to use.
struct Node
{
std::string Descrip;
double Price;
int Quant;
Node *Link;
};
...
void InsertFunction(char *InitDescrip, double InitPrice, int InitQuant, Node *Current)
{
Current->Descrip = InitDescrip;
Current->Price = InitPrice;
Current->Quant = InitQuant;
Current->Link = Root;
}
of course if you must use those C char arrays, then do this
strcpy(Current->Descrip,InitDescrip);
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,957 posts
since Aug 2005