mercredi 22 avril 2015

Implementing pure virtual functions in twice derived classes?


class C inherits from class B which inherits from class A

So class A is the base class. Let's say the function is

virtual display const () = 0;

And I implement the pure virtual function in class C with say...

virtual display const(){std::cout << "chocolate" << std::endl};

Why do I get a gcc error telling me that I haven't defined all pure virtual functions in my code?

Aucun commentaire:

Enregistrer un commentaire