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
时间: 2024-10-19 18:28:30