Advertisements
Advertisements
Question
Why do we need a constructor as a class member?
Short Answer
Solution
A constructor is a class member that can be called automatically when generating an object. A call to the constructor is required to complete the creation of an object.
shaalaa.com
Is there an error in this question or solution?
Chapter 7: Constructors - EXERCISES [Page 418]