Hmm, I was trying to load strings from a file(formated) to an 2D Array... but....
FILE * fp;
char TempBuffer[100][100];
char array_game[100][100];
fp=fopen(filename,"r");
for(i=0; i<100; i++) // Create 2D array to Hold the array of the file
{
for(j=0; j<100; j++)
{
fgets(TempBuffer,101,fp);
strcpy(&array_game[i][j],TempBuffer);
}
}
I get these warnings:
warning: passing argument 1 of ‘fgets’ from incompatible pointer type
: note: expected ‘char * __restrict__’ but argument is of type ‘char (*)[100]’warning: passing argument 2 of ‘strcpy’ from incompatible pointer type
/usr/include/string.h:127: note: expected ‘const char * __restrict__’ but argument is of type ‘char (*)[100]’
Please, help I'm stuck in this point some hours!
xxx