Chapter 28 Flashcards
What is virtual function
A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class’s version of the function.
What is static binding
Static binding means that target function for a call is selected at compile time
What is dynamic binding
Dynamic binding means that target function for a call is selected at run time.
What is limited polymorphism
When we have base class object/reference and it is pointing to derived class object/reference, so we can call derived class member functions through base class pointer/reference. It is called limited polymorphism.
Does C++ apply dynamic binding with virtual functions or we can say polymorphism uses virtual functions for dynamic binding
Yes