const int MAX=200;
char line[MAX];
char s2[MAX];
inf.getline(line,MAX);
for(;;)
{
for(int i=0; i < MAX ; i++)
{
if (line[i]=='\0')
break;
else if ( line[i] != ' ')
strcat(s2, line[i]);
}
}
hello, I have a question. I'm trying to have the loop process words in the array "line" and copy the words onto another array s2. however, this keeps giving me the error
" .\reformat.cpp(71) : error C2664: 'strcpy' : cannot convert parameter 2 from 'char' to 'const char *'"
what am i doing wrong? Thank you!