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 |
How do you sort a sort function in c++ to sort in descending order?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
How a new element can be added or pushed in a stack?
When to use Multiple Inheritance?
What are guid? Why does com need guids?
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
What is null c++?
Difference between pointer to constant and constant pointer to a constant. Give example.
What is meant by iomanip in c++?
What is a v-table?
To what does “event-driven” refer?
Explain shallow copy?