Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4
- 4
- 1 2 3 4
- 1 2 3 4
- 1 2 3 4
- 1 2 3 4
- Matrix array1("file1.txt");
- cout << (array1);
- class Matrix {
- public:
- Matrix(string filename);
- Matrix();
- Matrix(int x, int y);
- private:
- int x;
- int y;
- };
- Matrix:: Matrix(string filename){
- int array[99][99]; //assume thats the maximum size
- ifstream fin;
- fin.open(filename);
- if (fin.is_open()) {
- fin >> Matrix.x;
- fin >> Matrix.y;
- // how should I store the 2D array.
- printMatrix(x,y);
- }
Add Comment
Please, Sign In to add comment