C++

Topic: Constructors and destructors

What is a conversion constructor?  

Conversion constructors are used for type conversion wherein the type of argument passed is converted to the class type. Example:  conversion from type int to Point. class Point { public:       Point();       Point( int );       //...};

Browse random answers: