C++ Lesson 02: Classes and Objects

Class: A class in C++ is a user-defined data type, which can hold its own data members and member functions in a block. In the class, the member data and functions can be stored in different sections: private, protected, and public. The default section for the class is private. The class is similar to a struct, but the default section is the public in a struct.