为什么无法实现io重载?
ostream & operator <<(ostream& os,Strings &s)
{
if(s.ps!=NULL)
os<<s.ps<<endl;
return os;
}
并且 在类中定义了 friend ostream & operator <<(ostream &os,Strings &s);
却连接不成功,提示Strings1.obj : error LNK2005: "class ostream & __cdecl operator<<(class ostream &,class Strings &)" (??6@YAAAVostream@@AAV0@AAVStrings@@@Z) already defined in Strings.obj
Debug/Strings.exe : fatal error LNK1169: one or more multiply defined symbols found
这是怎么回事呀?