Hello all. I am currently working on a project in which i use a 2d array to hold a representation of a map for the game snake. I draw the map in a file and then read it into the 2d array. I read it in fine, because i can cout it but then heres where my problem occurs. It just cout's it in a line, instead of how i had it written in the file. Is there anyway to make it so it looks exactly like whats in the file? Heres my code for reading it in and outputting it. Thanks for any help!
COL and ROW are const int's with the max size of the 2d array.
Code:for(row=0;row<ROW;row++){ for(col=0;col<COL;col++){ in >> array[row][col]; cout << array[row][col] << endl; } }