Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by dat ( 8 years ago )
#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;

void ReadMatrix(int **&a,int &line)
{
 
 fstream f;
 f.open("Matrix.txt");
 if (!f.is_open())
 {
  cout << "Fail to open file!" << endl>> line;
  for (int i = 0; i < line xss=removed xss=removed>> a[i][j];
   }
  }
 }
 f.close();
}

void main()
{
 int **a, line;
 ReadMatrix(a,line);
 for (int i = 0; i < line; i++)
 {
  for (int j = 0; j < line; j++)
  {
   cout << a[i][j];
   cout << " ";
  }
  cout << endl;
 }
 system&#40;"pause"&#41;;
}

 

Revise this Paste

Parent: 92194
Your Name: Code Language: