why to use operator overloading

Answer Posted / rekha

Operator overloading means giving additional meaning to
existing operators

Operators are defined to perform some operation on
fundamental types .Operator cannot work with user defined
types like classes and struct.so concept of operator
overloading means allows defining the meaning of operator so
that the can be used for performing operations on user defined
types.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

officer say me - i am offered to a smoking , then what can you say

1578


What does no cap mean?

590


how to get the oracle certification? send me the answer

1668


What are the 3 pillars of oop?

611


What is inheritance in simple words?

623






What are the components of marker interface?

600


Is react oop?

607


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1696


How Do you Code Composition and Aggregation in C++ ?

24187


What is polymorphism and types?

596


How can you overcome the diamond problem in inheritance?

765


What is object-oriented programming? Webopedia definition

717


What is the difference between a constructor and a destructor?

609


What are oops methods?

566


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1652