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 |
Is std :: string immutable?
What is a built-in function?
diff between pointer and reference in c++?
Why do we need templates?
What are the popular tools used to detect memory leaks in c++
What is dangling pointers?and what is memory leak?
Can non graphic characters be used and processed in C++?
Is java made in c++?
what is the order of initialization for data?
10 Answers Amazon, TCS, Wipro,
Please explain the reference variable in c++?
What is the use of data hiding?
What is the difference between a type-specific template friend class and a general template friend class?