Reading from .txt file into two dimensional array in c++

I believe that

istream inputStream;
int myArray[3][5];
for(int i = 0; i < 3; i++)
    for(int j = 0; j < 5; j++)
        istream >> myArray[i][j];

should do what you need.

Leave a Comment