Writing a class named main is not allowed generally in C++ , as the compiler gets confused it with main() method. Hence when we write the main class, creating its object will lead to error as it won’t consider the ‘main’ as a class name.
Read moreWhat are the class members in C++?
C++ classes have their own members. These members include variables (including other structures and classes), functions (specific identifiers or overloaded operators) known as methods, constructors and destructors .
Read more