C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

what is operator overloading

0 votes
361 views
asked Jan 16, 2016 by anonymous

1 Answer

0 votes
When an operator is overloaded, it takes on an additional meaning relative to a certain class. But it can still retain all of its old meanings.

Examples:

1) The operators >> and << may be used for I/O operations because in the header, they are overloaded.

2) In a stack class it is possible to overload the + operator so that it appends the contents of one stack to the contents of another. But the + operator still retains its original meaning relative to other types of data.
answered Jan 24, 2016 by anonymous

Related questions

0 votes
1 answer 37 views
37 views asked Apr 8, 2014 by sara Guru (24,570 points)
0 votes
2 answers 45 views
45 views asked Nov 22, 2010 by anonymous
+1 vote
1 answer 82 views
82 views asked Jun 10, 2010 by anonymous
0 votes
1 answer 8,227 views
8,227 views asked Sep 14, 2011 by anonymous
0 votes
1 answer 39 views
39 views asked Dec 17, 2013 by john Guru (27,140 points)
...