I need to do a program that reads a .txt file and stores it into a bidimentional character array and the show it in screen.
I have this code, but i dont know the conditional for the end of line in c++.
Basically i want to read a whole line and store it and then change the second index of the char matrix and read again, and so on, until the end of the file.
The call to getline() is its own end-of-file condition: like most other stream input operations, it returns a value which evaluates as true if the operation succeeded and as false if it failed (due to end of file, or some other error)
You're also apparently trying to read into columns of a 2D array. It's the rows that are contiguous.