template <typename T> std::ostream& operator << (std::ostream &OutStream, const Matrix2d<T> &MatrixObj) { Matrix2d<T> *pMatrixTmp =const_cast<Matrix2d<T> *>( &MatrixObj ); for(int i = 0; i < pMatrixTmp->getMatrix2dRow(); i++){ OutStream << "|"<< " "; for(int j = 0; j < pMatrixTmp->getMatrix2dColumn(); j++){ OutStream << *(pMatrixTmp->getMatrix2dData() + i*pMatrixTmp->getMatrix2dColumn() + j)<< " "; } OutStream << "|" << std::endl; } return OutStream; }