This question already has an answer here:
declaration in class:
friend ostream& operator<<(ostream & os, const MyClass & _my_class );
call:
MyClass mc;
...
...
cout << mc << endl;
-
Why does something like that not work?
cout.operator<<(mc)
-
Where is the first argument?
(ostream &os, ...)
-
How does compiler solve this?
Aucun commentaire:
Enregistrer un commentaire