+106 votes
233 views
what is ctor in c++?
in General by (72 points) | 233 views

Please log in or register to answer this question.

2 Answers

+103 votes
ctor is the short form of the constructor. The same like dtor denotes destructor.
by (111 points)
+106 votes
A constructor is a special type of member function that is called automatically when an object is created. In C++, a constructor has the same name as that of the class and it does not have a return type.
by (1.0k points)