c 2b 2b read matttrix from text file

Solutions on MaxInterview for c 2b 2b read matttrix from text file by the best coders in the world

showing results for - "c 2b 2b read matttrix from text file"
Emelie
30 Oct 2016
1	
2ifstream f("matrix.txt");
3f >> m >> n;
4
5if ((m != 4) || (n != 3))
6  {
7  cout << "Matrix not 4 by 3!n";
8  return 1;
9  }
10
11for (int i = 0; i < m; i++)
12for (int j = 0; j < m; j++)
13  f >> A[i][j];