How to stop conversions among objects?

Answers were Sorted based on User's Feedback



How to stop conversions among objects?..

Answer / vk

Using explicit keyword in the constructor

Is This Answer Correct ?    4 Yes 0 No

How to stop conversions among objects?..

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

How to stop conversions among objects?..

Answer / p.madhupriya

declare the duplicate operator.

Is This Answer Correct ?    0 Yes 0 No

How to stop conversions among objects?..

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 to stop conversions among objects?..

Answer / anupam deo

Use operator overloading

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C++ General Interview Questions

Explain the static storage classes in c++.

0 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


What are the differences between a struct in C and in C++?

8 Answers   Amazon, Wipro,


What's the order in which the local objects are destructed?

0 Answers  


Describe new operator and delete operator?

0 Answers  






What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

0 Answers  


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

0 Answers  


Why do we use classes in c++?

0 Answers  


What is virtual base class uses?

0 Answers  


Comment on assignment operator in c++.

0 Answers  


How is computer programming useful in real life?

0 Answers  


What is an overflow error?

0 Answers  


Categories