is the syntax used below is correct?
class zz
{
private :
string s;
//constructor
private:
friend zz operator-(zz z);
//assume definition of operator<<
};
//constructor
//operator<<
zz operator-(zz z)
{
string s;
s=z.s+"hello";
return zz(s);
}
int main()
{
zz a("fsd");
cout<<(-a);
}
i am new to c++ but just enthusiastic