1 3 0 2 4
0 4 1 3 2
3 1 4 2 0
1 4 3 0 2
3 0 2 4 1
3 2 4 0 1
0 2 4 1 3
I have a matrix like this in a .txt file. Now, how do I read this data into a int**
type of 2D array in best way? I searched all over the web but could not find a satisfying answer.
array_2d = new int*[5];
for(int i = 0; i < 5; i++)
array_2d[i] = new int[7];
ifstream file_h(FILE_NAME_H);
//what do do here?
file_h.close();