Through virtual tables.
Read this article, http://en.wikipedia.org/wiki/Virtual_table.
I could explain it here, but the wikipedia does a better job than I could.
More Related Contents:
- Thou shalt not inherit from std::vector
- How to call a parent class function from derived class function?
- C++ virtual function from constructor [duplicate]
- What is the point of a private pure virtual function?
- Why should I use the “using” keyword to access my base class method?
- virtual inheritance [duplicate]
- Diamond inheritance (C++)
- Inheritance or composition: Rely on “is-a” and “has-a”?
- C++ inheritance and member function pointers
- C++ Double Dispatch for Equals()
- Calling derived class function from base class
- C++ Virtual function being hidden
- What does slicing mean in C++?
- Weird behavior with OOP and string pointers
- What are the rules for calling the base class constructor?
- Virtual/pure virtual explained
- Separating class code into a header and cpp file
- virtual assignment operator C++
- Vectors and polymorphism in C++
- How to achieve “virtual template function” in C++
- Trouble with inheritance of operator= in C++
- Copy constructor is not inherited
- What is the difference between a concrete class and an abstract class?
- How to call derived class method from base class pointer?
- Why is the STL so heavily based on templates instead of inheritance?
- C++ virtual table layout of MI(multiple inheritance)
- When to use C++ private inheritance over composition?
- Class inherited from class without default constructor
- Struct inheritance in C++
- Using C++ base class constructors?