Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Working with Class in C++

Illustrative examples for the following discussions can be found here.

  1. It is suggested that you also provide a default constructor if you ever provide a user-defined constructor when writing a C++ class.

  2. If you want to allow deleting a derived class from a pointer of the base class, you have …