What is conversion constructor?

constructor with a single argument makes that constructor as conversion constructor and it can be used for type conversion.

for example:

class Boo
{
    public:
            Boo( int i );
};

Boo BooObject = 10 ; // assigning int 10 Boo object

No comments:

Post a Comment