How to stop conversions among objects?
Answers were Sorted based on User's Feedback
Answer / kavitha
If any situation like that the constructor should build the
objects and should not get used for carrying out
conversions, In that situation we are required to use the
explicit keyword with the constructor.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / v.senthil kumaran
Declare operator function (dummy) for assignment operator
in the private section of the class.
| Is This Answer Correct ? | 0 Yes | 2 No |
What is "map" in STL?
How do you declare a set in c++?
What is the use of seekg in c++?
What is abstraction c++?
Define a nested class. Explain how it can be useful.
Consider the following code fragment: int main(void) { int m = 4; mystery ( m ); mystery ( m ); printf("%d", m); return 0; } What is the output on the monitor if mystery is defined as follows ? void mystery (int m) { m = m+3; }
What are the differences between the function prototype and the function defi-nition?
What are the sizes and ranges of the basic c++ data types?
print first nodd numbers in descending order
when can we use virtual destructor?
7 Answers HCL, HP, Virage Logic,
What is dangling pointers?and what is memory leak?
What is the use of vtable?