What is a conversion constructor?
Answer / munendra kumar
A constructor that accepts one argument of a different type.
The compiler uses this idiom as one way to infer conversion rules for your class. A constructor with more than one argument and with default argument values can be interpreted by the compiler as a conversion constructor when the compiler is looking for an object of your constructor's type and sees an object of the type of the constructor's first argument.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which operations are permitted on pointers?
Can you pass a vector to a function?
Is string an object in c++?
How do you write a function that can reverse a linked-list?
What is the keyword auto for?
What is runtime polymorphism in c++?
In a function declaration, what does extern mean?
What is the best c++ compiler for windows 10?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
What is virtual destructor ans explain its use?
What is the main function c++?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples