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

Please log in or register to answer this question.

2 Answers

+127 votes
ctor is the short form of the constructor. The same like dtor denotes destructor.
by (111 points)
+151 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)