//-------- matrix.cpp --------- #pragma hdrstop #include #include #include #include #include //--------------------------------------------------------------------------- #pragma argsused void MultiplyMatrix(); int ROWS; int M1[40][40]; int M2[40][40]; int main() { fstream fin("matrix.txt", ios::in); char input; fin.get(input); ROWS = 0; while(input != '\n') { ROWS++; fin.get(input); } fin.seekg(0); fin.get(input); for(int Row=0; !fin.eof(); Row++) { for(int Col=0; !fin.eof(); Col++) { M1[Row][Col] = atoi(&input); M2[Row][Col] = atoi(&input); //cout << input << " "; fin.get(input); if(input=='\n') break; } cout << endl; fin.get(input); } int power; cout << "Raise matrix to what power? "; cin >> power; for(int i=1; i