What happens if you don’t create a constructor for a class C++?

In C++, the compiler creates a default constructor if we don’t define our own constructor. In C++, compiler created default constructor has an empty body, i.e., it doesn’t assign default values to data members.

Sizin İçin Seçtik  Are donkey kicks as effective as squats?

Leave a Reply

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