Hooray! You’ve learned the basics of classes and objects in C++:
- Classes are user-defined types.
- Objects are instances of classes.
- Class members are the data attributes and functions inside of a class.
- Creating a new object from a class is called instantiation.
- Class members can be designated as either
public— they are
- You can create a constructor to instantiate objects in a particular way.
- A destructor allows you to execute any cleanup necessary before an object gets destroyed.
We’ve added a few files so you can create some of your own classes and objects!