How to stop conversions among objects?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In what situations do you have to use initialization list rather than assignment in constructors?

637


Explain linear search.

634


What is the use of string in c++?

553


What are the basic data types used in c++?

557


Write a c program for binary addition of two 8 bit numbers.

3669






Differentiate between structure and class in c++.

604


Explain selection sorting?

640


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

592


What is insertion sorting?

671


When should overload new operator on a global basis or a class basis?

617


What are structures and unions?

575


What does #define mean in c++?

617


What is the function of I/O library in C++ ?

668


If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

645


What is the identity function in c++? How is it useful?

553