Give two reasons why you might need to overload a class's constructor in a computer program.

      

Give two reasons why you might need to overload a class's constructor in a computer program.

  

Answers


Davis
One reason of overloading a constructor is to provide flexibility, allowing you to choose the most appropriate constructor in the specific instance.
Another is to allow both initialized an uninitialized objects to be declared.you might want to overload a constructor so that dynamic arrays can be allocated.
Githiari answered the question on February 4, 2018 at 12:55


Next: Give one disadvantage of reference parameters.
Previous: What is the most common general form of a copy constructor in C++ language?

View More Computer Science Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions