What is a default constructor? Can we provide one for our class?

Trainee Asked on August 15, 2019 in C++ Language.
Add Comment
1 Answer(s)

Every class does have a constructor provided by the compiler if the programmer doesn’t provides one and known as default constructor. A programmer provided constructor with no parameters is called as default constructor. In such case compiler doesn’t provides the constructor.

Supporter Answered on August 15, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.