int read_file()
{
char board[7][11];
int n,m;
ifstream inFile("file.txt");
for(n=0; n<7; n++)
for(m=0; m<11; m++)
inFile>>board[n][m];
return 1;
}
The txt-file looks like this: ( The stars are really empty space characters. Had to replace them with stars for posting.)
1|*******|1
2|******5|2
3|*4****5|3
4|*4***25|4
5|*433325|5
6|*4****5|6
7|*******|7
I want that my program shows contents of array like they are shown in txt-file.
But after reading it my program shows it like this:
1||12|5|23|
45|34|425|4
5|433325|56
|45|67||6|4
5|433325|56
|45|67||6|7
7| |7
If there are no empty spaces between numbers the array looks like it is supposed look like.