2081 10

BIT153 ยท 2081 ยท 5 marks

How do you convert basic data type to user defined data type? Explain.

How do you convert basic data type to user defined data type? Explain. [5]

Object Oriented ProgrammingChapter 7: Operator Overloading and Type ConversionType conversion

In C++, converting a basic (built-in) data type (such as int, float, double, char) to a user-defined data type (such as a class or struct) is achieved using a special constructor called a conversion constructor. --- A conversion constructor is a single-argument constructor defined inside a class ...