class Unikitty { }; class Puppycorn : public Unikitty { int dr_fox; };
Which of these is true?
Unikitty
is-a Puppycorn
Unikitty
is-a dr_fox
Puppycorn
is-a Unikitty
Puppycorn
is-a dr_fox
dr_fox
is-a Unikitty
dr_fox
is-a Puppycorn
class Unikitty { }; class Puppycorn : public Unikitty { int dr_fox; };
Which of these is true?
Unikitty
has-a Puppycorn
Unikitty
has-a dr_fox
Puppycorn
has-a Unikitty
Puppycorn
has-a dr_fox
dr_fox
has-a Unikitty
dr_fox
has-a Puppycorn
Can private
methods in a derived class call private
methods in
the base class?
public
in the derived class.
private
!
--
Which method is the best way to make Foo f; f--;
work?
operator--()
operator--(int)
Foo operator--()
Foo operator--(int)
Foo &operator--()
Foo &operator--(int)
What will this code produce?
ostringstream oss; oss = "Flying Spaghetti Monster"; cout << oss.str();
Flying
Flying Spaghetti Monster
6
24