C++ examples for Class:Destructor
Explicitly Defining a Destructor
#include <cinttypes> class Car { private: int m_NumberOfWheels{}; public: Car() = default; Car(int numberOfWheels) : m_NumberOfWheels{ numberOfWheels } { } ~Car() = default; int GetNumberOfWheels() { return m_NumberOfWheels; } };