this operation:
Expand|Select|Wrap|Line Numbers
- cout << aMatrix.Transpose( ) << endl;
Expand|Select|Wrap|Line Numbers
- ostream & operator<<( ostream & out, const Matrix & matrixRHS )
moving values into a temp Matrix object and then assignin it to the
calling object] is:
Expand|Select|Wrap|Line Numbers
- void Transpose( void );
deal with the << operator]
Expand|Select|Wrap|Line Numbers
- Test.cpp:32: error: no match for ‘operator<<’ in ‘std::cout << aMatrix. Matrix::Transpose()’
- /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:67: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
- /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:78: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
- /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:90: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
- /usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:125: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>]
However, the code functions correctly with this set of commands:
Expand|Select|Wrap|Line Numbers
- aMatrix.Transpose( ) ;
- cout << aMatrix << endl;