Can we create an object without constructor in C++?

Defining a class without a constructor but with a destructor is perfectly legal C++, but is not recommended. Your compiler will try to generate a default constructor for you, which will automatically call the default constructor of all members in your class.

Sizin İçin Seçtik  Finansal analiz bize hangi konularda bilgi verir?

Leave a Reply

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