MPrestonf12
Mar 10th, 2001, 11:18 PM
I can't figure out if it is legal to allocate space as to say:
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.
class stringop {
public:
void combinestr(char *str1, char *str2);
};
void stringop::combinestr(char *str1, char *str2)
{
strcat(str1,str2);
cout << str1;
}
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.
class stringop {
public:
void combinestr(char *str1, char *str2);
};
void stringop::combinestr(char *str1, char *str2)
{
strcat(str1,str2);
cout << str1;
}