To create an object of Main , specify the class name, followed by the object name, and use the keyword new :
Read moreHow do you declare an object in C++?
Defining Class and Declaring Objects A class is defined in C++ using keyword class followed by the name of class . The body of class is defined inside the curly brackets and terminated by a semicolon at the end.
Read moreWhat is an object declaration?
An object_declaration declares a stand-alone object with a given nominal subtype and, optionally, an explicit initial value given by an initialization expression . For an array, task, or protected object, the object_declaration may include the definition of the (anonymous) type of the object.
Read more