What is a conversion constructor?



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

Post New Answer

More C++ General Interview Questions

What does namespace mean in c++?

0 Answers  


What is the basic of c++?

0 Answers  


What are features of c++?

0 Answers  


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

0 Answers  


write a porgram in c++ that reads an integer and print the biggest digit in the number

0 Answers  






Explain what are mutator methods in c++?

0 Answers  


What is the full form nasa?

0 Answers  


What are the advantages of using const reference arguments in a function?

0 Answers  


char *ch = "abcde"; char c[4]; how to copy 'ch' to 'c'?

4 Answers   Thomson Reuters,


What is volatile and pragma? When they are used?

1 Answers  


What are the advantages of c++? Explain

0 Answers  


What is basic if statement syntax?

0 Answers  


Categories