What will happen if there are no constructor in C++?

If your class has no constructors, C++ will automatically generate a public default constructor for you . This is sometimes called an implicit constructor (or implicitly generated constructor).

Sizin İçin Seçtik  What is the syntax of destructor?

Leave a Reply

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