I'm trying to keep concatenating the largeVal with smallVal when input a, and store the result into arr[] array.
int driver()
{
char buffer[MAXLINE];
char reply[MAXLINE * 1000];
char largeVal[MAXLINE] =
"a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10a1b2c3d4e5f6g7h8i9j10";
char smallVal[MAXLINE] = "5";
while (strcmp(buffer,"a") == 0)
{
arr[MAXLINE * 1000] = strcat(smallVal, largeVal);
}
return foo(buffer, reply);
}
The error message is the following:
warning: assignment to ‘char’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
91 | arr[MAXLINE * 1000] = strcat(smallReply, largeReply);
| ^
How should I fix this?
bufferis uninitialized and nothing ever modifies it. There's no user input or anything.