Your function definitions in Matrix.cpp needs to include the return type. The error is telling you that C++ does not support a default return type so you have to specify one.
-
Matrix::addMatrix(Matrix m1, Matrix m3)
-
-
needs to be changed to
-
-
void Matrix::addMatrix(Matrix m1, Matrix m3)
-
You will need to do that to all your other function calls, but not on the constructor or destructor.
thanks :D
i have reduced the errors to just 9 now...
they are as follows:
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.h(32) : error C2087: 'm' : missing subscript
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.h(32) : warning C4200: nonstandard extension used : zero-sized array in struct/union
1> Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(67) : error C2676: binary '[' : 'Matrix' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(82) : error C2676: binary '[' : 'Matrix' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(83) : error C2676: binary '[' : 'Matrix' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(83) : error C2676: binary '[' : 'Matrix' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(84) : error C2676: binary '[' : 'Matrix' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(92) : error C2228: left of '.col' must have class/struct/union
1> type is 'double [][1]'
1>c:\users\slizorn\documents\visual studio 2008\projects\exercise2\matrix.cpp(98) : error C2228: left of '.row' must have class/struct/union
1> type is 'double [][1]'