in my program, in insert function:
void apple :: insert(string s, int a)
{
node *ptr;
ptr = new node;
strcpy(ptr->name, s);
ptr->price = a;
ptr->next=head;
head=ptr;
}
this is acctually i want to do
strcpy(ptr->name, s);
but error is:
cannot convert std::string {aka std::basic_string<char>} to char* for argument 1 to char * strcpy(char*, constant char)
any one plz help debug it, fastly, i have very short time to submit my project :(
thank you.