这个string类问题,高手来!

来源:百度知道 编辑:UC知道 时间:2024/06/25 21:28:17
string j;在使用cout<<j;时调用了string类中的哪个重载函数啊?

void operator << (ostream &os, CIOSTest &test)
{
cout<<test.data;
}

上面的例子说明,cout cin endl等等是调用了<< >>等运算符函数
其中要含有参数ostream &os