追问:#include<iostream>
#include<string>
using namespace std;
ostream & operator<<(ostream & co, const string f1)
{
co << "hello world" << endl;
return co;
}
int main()
{
string a = "5465555";
cout << a;
}
//这个操作符重载默认情况下会覆盖 原有的输出吗? 重载<<运算符就会输出 hello world;把上面的重载函数
会,不然为什么叫重载。