<Heder.h>
//объявление
friend ostream& operator <<(ostream &, matrix<T> &);
//реализация
template<typename T>
ostream& operator << (ostream &os, matrix<T> &obj)
{
for (int i = 0; i < obj.row; i++)
{
for (int j = 0; j < obj.col; j++)
os << setw(4) << obj.p[i][j];
os << endl;
}
os << endl;
return os;
}
Ошибка:
Error 1 error LNK2019: unresolved external symbol "class std::basic_ostream > & __cdecl operator<<(class std::basic_ostream > &,class matrix &)"