friend ostream& operator<< <T>(ostream &out, Complex &c);
template <typename T> ostream& operator<<(ostream &out, Complex<T> &c) { out << c.a << " " << c.b << endl; return out; }
模板类中的友元函数
原文:https://www.cnblogs.com/ya-cpp/p/9585849.html