+ 4
How many types of constructors are there in c++?
Give an answer
5 Answers
+ 4
In c++ there are three types of Constructer:
1 : Default Constructor.
2: Parametrized Constructor.
3: Copy COnstructor.
+ 4
It depends on the cpp version
previous,11,14,17...
Usually the compiler is able to generate default, copy(&) and moove[since c++11] (&&) constructors if you don't declare /delete them
Also copy/move assignment operator and destructor is created.
You can make as many overloaded constructors as needed.
+ 3
I don't know the number but I think it is not important care about them.
I imagine you kept lots đ ,that's why you ask.
+ 2
Default, parameterized, Move, Copy... something else?
+ 2
it depends on the cpp version
basic constructor are default, parametrised, default parametrised, copy, move constructor.
In new version of cpp includes all type of constructor function which written above