Sunday, 8 September 2013

how to assign string value to char* array directly

how to assign string value to char* array directly

string s="hello";
char *c;
How to assign s to *c? Alternatively, how to assgin s to a char array like
(char a[];)? i cannot do it by char a[]=s;

No comments:

Post a Comment