Hi guys, I need help when overloading << in a base class (the overloading has to be virtual i guess), would anyone give me a brief example?
My teacher didn't explained us that! Thanks in advance!
From my experience it's best not to make virtual operators, but instead you have the operator call a virtual member. This way you only need to overload the operator in the parent class: