What is a conversion constructor? - C++

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 );
       //...
};

What is a conversion constructor?

It is a constructor that accepts one argument of a different type.
Advantages of inline functions - C++
Explain the advantages of inline functions - It relieves the burden involved in calling a function. It is used for functions that need fast execution.....
Different access specifiers for the class member in C++
Different access specifiers for the class member in C++ - private: It is default one and can be access from class member of the same class...
What is the importance of mutable keyword? - C++
What is the importance of mutable keyword? - The mutable keyword allows the data member of a class to change...
Post your comment