Can anyone help me understand function polymorphism ?
sham 0 Light Poster
Recommended Answers
Jump to PostIt's pretty simple, really, kinda sorta. You have a base class with a virtual function, and a derived class that redefines the virtual function. By creating a reference to an object of the base class and initializing it with an object of the derived class, the virtual function will call …
Jump to PostSuppose you have (for explanation unnecessary features stripped!):
class Animal { virtual void output() = 0; }; class Dog : public Animal { virtual void output() {bark();} } class Bird : public Animal { virtual void output() {tweet();} }
A container can only hold objects of same …
All 6 Replies
Narue 5,707 Bad Cop Team Colleague
rati 0 Junior Poster in Training

jencas
rati 0 Junior Poster in Training

jencas
digitaldesperad 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.