Combining Separate Classes
Single common function name, print, that can be used for both data types:
Apple anApple("Rome");Orange anOrange;// can print both apples and orangesprint (anApple, cout);print (anOrange, cout);
Previous slide
Next slide
Back to first slide
View graphic version