What is operator overloading? Give Example

Answer Posted / msn

Making an operator doing different operation other than
the normal one is termed as operator overloading..

Say for example Operator + is normally used to add numbers
but we can add another function concatenate two strings

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

759


Which type does string inherit from?

713


What is super in oop?

694


What is polymorphism in oops with example?

641


What is the point of oop?

743






What is pointer in oop?

632


What does sksksk mean in text slang?

1688


What are constructors in oop?

677


Plese get me a perfect C++ program for railway/airway reservation with all details.

3526


How is class defined?

686


what are the realtime excercises in C++?

2431


What is overloading in oops?

703


What is polymorphism and example?

666


What is destructor oops?

712


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3659