+ 1

What is the use of constructors?

why do use it in our c++ programs...

4th Aug 2017, 3:29 PM
Arjun Gaikwad
1 Answer
+ 13
They are used to initialise specific object values..... Constructors are called upon the creation/instantiation of new objects of a class... Useful if you want to create something like an incremental counter of created objects using a static variable and for many other reasons.....
4th Aug 2017, 3:36 PM
Valen.H. ~
Valen.H. ~ - avatar