Operator Overloading vs Operator Overriding

Operator Overloading in C++ refers to the case when a multiple methods with the same name exist but take arguments of different types as its input.  The classical example is an Add Method which can add different objects of different types.

Operator Overriding refers to a process of changing the implementation of a method from a base class which was declared as a virtual method.  A classical example is the getArea method for different shapes in an OOP shape model paradigm.

Advertisements
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

4 Responses to Operator Overloading vs Operator Overriding

  1. wiphungbou daimai says:

    Operator Overloading in vb.net examples?

  2. P.Sharmila says:

    Please bring more details about operator overriding with example in internet

  3. abdul majid says:

    dear it is method overloading and method overriding not operator…..

  4. Tavik says:

    your answer can mess up a newbie’s concepts of object oriented language terribly. What you answered was OPERATOR OVERLOADING and OPERATOR OVERRIDING, which should be FUNCTION OVERLOADING and FUNCTION OVERRIDING. OPERATOR OVERLOADING is different from FUNCTION OVERLOADING, and in your answer you described FUNCTION OVERLOADING under OPERATOR OVERLOADING. Your page is one of the top results in google search. So kindly make your answer correct.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s