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 |
given the code segment below void main() { cout<<"my no. is"; } question is how can we get the output hai aravind my no. is 99999999999 without editig the main().
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
what is pre-processor in C++?
Explain binary search.
What is the purpose of the noexcept keyword?
What is the use of endl in c++ give an example?
How do I tokenize a string in c++?
What is oop in c++?
Problem 6: Area of a trapezoid can be calculated by the following formula: A=(b1 b2)×h2 where b1 and b2 are the parallel sides or the bases and h is length of height Write a C code of this program
How do I run a program in notepad ++?
Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number
What are disadvantages of pointers?