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 |
Write a program to interchange 2 variables without using the third one.
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
Are vectors faster than arrays?
What are the restrictions apply to constructors and destructors?
Is c++ fully object oriented?
sir i want to study the c++ course but ino what is the qualification and the study methode please reply more details in c++
What is enum class in c++?
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.
Does c++ vector allocate memory?
Explain the difference between static and dynamic binding of functions?
What is the difference between = and == in C?
20 Answers Christ University, Intel,
What are access specifiers in C++?