Archive for the ‘ Cplusplus ’ Category

C++ Virtual Destructor

All base classes should have a virtual destructor . If the class should be abstract (you want to prevent instantiating it) but it doesn’t happen to have any other pure virtual functions, a common technique to make the destructor pure virtual:
Read the rest of this entry »

C++ Pure Virtual Function Explained

A C++ pure virtual function is a virtual function that you want to force derived classes to override. If a class has any non-overridden pure virtuals, it is an “abstract class” and you can’t create objects of that type.
Read the rest of this entry »