0

operator<< cout overload

I recently watched a c++ video of "The Cherno Project" - copying and copy constructors, and on that video he overloaded cout << operator, well i got confused because he doesnt write the function declaration, only the implementation outside of the class, also he passes an ostream object as parameter, couldnt he just use This? To sum up i would like help on overloading << cout operator, and some explanation since im confused https://code.sololearn.com/cpkb0iLDHSnZ/?ref=app

8th Oct 2019, 6:49 PM
Denomycor
Denomycor - avatar
1 Réponse
0
I anexed a example code, im not sure if it is correct, but i tried to reproduce it accuratly
8th Oct 2019, 6:53 PM
Denomycor
Denomycor - avatar