I can't figure out if it is legal to allocate space as to say:
Code:void combinestr(char *str1[80], char *str2[80]);
I get a illegal operation from this code but I can't find a way to allocate space in a buffer for the characters.
Code:class stringop { public: void combinestr(char *str1, char *str2); }; void stringop::combinestr(char *str1, char *str2) { strcat(str1,str2); cout << str1; }





Reply With Quote