I have file that goes like 7 4 5 1 etc. I want to put these number in a multi-dimensional array.
for(x=0;x<9;x++)
for(y=0;y<9;y++)
{
current=fgetc(fp);
if(current!=EOF¤t!=' '¤t!='\n')
sudokuArray[x][y] = current-'0';
}
This code doesn't work properly. sudokuArray[0][0] gives the result true(first number in the file) but [0][1] gives some random number like 131231304. [0][2] gives what [0][1] supposed to be. Why is that?