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 #include sstream?
What is encapsulation in c++ with example?
what is the difference between overloading & overriding? give example.
What do you mean by function pointer?
Can a constructor throw a exception? How to handle the error when the constructor fails?
How can you differentiate between inheritance and implementation in c++?
What is protected inheritance?
the maximum length of a character constant can be a) 2 b) 1 c) 8
What is c++ similar to?
How do you remove an element from a set in c++?
How is data hiding achieved in c++?
Define vptr.