Destructors in C++

We’ve looked at Constructors in C++ to create an object, and building an object with new. However, what happens when we no longer need that object? That’s where a destructor is called. It is built into all objects, and if you don’t define one, a default one will be called for you. The destructor’s job…

Creating an Object

Once you create your class, you need to create an object. The Class is just a blueprint for the program to follow. It doesn’t do anything until you create an object based off of that blueprint. Think of a house. If you have a house blueprint, all you have are some sheets of paper or…