Is Main a class in C ++?

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.

Sizin İçin Seçtik  Does the main method have to be named Main?

Leave a Reply

Your email address will not be published. Required fields are marked *