Quantcast
Channel: Comments on: 11.4 — Constructors and initialization of derived classes
Viewing all articles
Browse latest Browse all 159

By: Alex

$
0
0

There’s a better answer. Remove the overloaded operator<< functions for Apple and Banana. You don’t need them.

Without them, Fruit::operator<&lt will be called, and that function already has everything it needs to print the Fruit’s name and color.


Viewing all articles
Browse latest Browse all 159

Trending Articles