I've created a very simple code but it doesn't work! I just want to create an array which will contain strings. However these strings must be put without the character-character method. In other words:
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
char wstr[20][10];
int i;
for (i=0;i<20;i++)
wstr[i]='BA';
return 0;
}
but the compiler shows me a warning and an error:
[Error] incompatible types when assigning to type 'char[10]' from type 'int'
[Warning] multi-character character constant [-Wmultichar]
What should I do?