In C++, in what case, the derived class must have its own constructor?
what about the three cases: 1) public inheritance; 2) private inheritance; 3) protected inheritance;
Thanks a lot.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All classes that are instantiated always have to have at least one constructor. If you don’t provide one, the compiler will provide one instead.
There aren’t any special rules for derived classes.