+ 4
How to overload operator<< in cpp ?
How to overload operator<< function in cpp of a class for desired output ?
3 ответов
+ 1
I have an example in this:
https://code.sololearn.com/cStdw0OPtPxG
+ 4
Does the operator<< really need to be a friend function or there is a way we can define it inside the class
0
I believe it must be a friend because cout will not call via a method invocation.