FAQ: I have a heterogeneous list of objects, and my code needs to do class-specific things to the objects. Seems like this ought to use dynamic binding but can't figure it out. What should I do? ←(in the new Super-FAQ)
It's in Section: Inheritance — virtual functions:
- FAQ: What is a "virtual member function"?
- FAQ: How can C++ achieve dynamic binding yet also static typing?
- FAQ: Difference between calling virtual and non-virtual member functions?
- FAQ: Implementation details and efficiency of calling a virtual function?
- FAQ: How can a member function in my derived class call the same function from its base class?
- FAQ: Using dynamic binding with objects in heterogeneous containers? (this FAQ)
- FAQ: When should my destructor be virtual?
- FAQ: What is a "virtual constructor"?