I have some code does not compile. I think it's missing an included library, but not sure.
In the int main() block of code, the following three items give errors:
1. Mtrx (the one following "new") - Error: expected a type specifier
2. result - Error: expected a ";"
3. &result - identifier "result" is undefined
Below is the code with the head to show you what has been included:
HTML Code:#include <iostream> #include <iomanip> using namespace std; #include <limits.h> // create the structure of the matrix struct Mtrx { int numRows; int numCols; float array[101][101]; }; // create the tables of the matrix struct MSTbl { int mTable[100][100]; int sTable[100][100]; }; void Input(int &, Mtrx *); void Output(int, Mtrx &); void DetEff(int, Mtrx *, MSTbl &); void RMM(int, int, Mtrx *, Mtrx *, int, MSTbl); void MM(Mtrx &, Mtrx &, Mtrx &); int main() { int numsMtrx; Mtrx *Mtrx = new Mtrx[500]; MSTbl MSTbl; Mtrx result; Input(numsMtrx, Mtrx); DetEff(numsMtrx, Mtrx, MSTbl); RMM(1, numsMtrx, &result, Mtrx, MSTbl.sTable[1][numsMtrx], MSTbl); Output(MSTbl.mTable[1][numsMtrx], result); return 0; }




Reply With Quote