I'm studying C language , so i'm new to C . I studied in High School just Pascal . I have an problem :
I have to sort alphabeticaly a bunch of strings that are read from the keyboard until the word "over" it's introduced .
I got an error : incompatible error :
incompatible types when assigning to type ‘char[10]’ from type ‘char’
The code is :
char *word = (char *)malloc(30);
int i = 0 ;
char matrixs[20][10];
if(word == NULL)
{
exit(-1);
}
do
{
printf("Insert the word ");
scanf("%s",word);
if(strcmp(word,"over") != 0)
{
matrixs[i] = *word;
}
}
while(strcmp(word,"over") != 0);
free(word);