6 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for muhammadnasiri

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 …

Member Avatar for deceptikon
0
295
Member Avatar for themenucha

Hi! what is wrong with the following function? void foo(*ptr){ char buff[127]; ctrcpy(*ptr,buff); } I know that it doesn't really do something... it's for information purpose only.... Thanx!!

Member Avatar for RickRoss$$
0
247
Member Avatar for modesto916

Hi, I'm writing a small C program to clean the radius radacct table, removing ended sessions records and inserting on a separated database. The problem is that MySQL C API doesn't have an easy way to insert the result of a query on another database/table directly, you have to build …

Member Avatar for modesto916
0
2K
Member Avatar for hwoarang69

how to copy pointer to pointer. char *name1; //store the value of DAVE char *name2; if name2 was a array i would have done. strcpy(name2,name1); but i dont know how to copy pointer into pointer. i was thinking some thing like this. name2 = name1? also do i need to …

Member Avatar for Shardendu
0
162
Member Avatar for hwoarang69

*i am trying to copy the value of ar2[10] //in main. has the value 1,2,3,4,5 in ar[10] //(in struct node). empty array so to copy the value iam not sure if i could use a strcpy for ex, strcpy(head->ar, ar2); //here is my code struct node { int ar[10]; //empty …

Member Avatar for hwoarang69
0
146
Member Avatar for hwoarang69

trying to copy pointer in array. lets say *pointer has the value "COMPUTER". and i want to store in array[o]; note: i want to use strcat to do this and i do not want to do some thing like "array[0]" char test[10]; char *point; //has the value "COMPUTER" for(int i …

Member Avatar for Vish0203
0
180

The End.