search
Login

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

0 votes
42 views
asked Guru 24.6k points 29 52 81

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 Expert 15k points 15 23 30

Related questions

0 votes
2 answers 49 views
49 views
asked anonymous
1 vote
1 answer 89 views
89 views
asked anonymous
0 votes
1 answer 282 views
0 votes
1 answer 8.2K views
1 vote
1 answer 151 views
151 views
Can you tell me about sizeof operator in C language?
asked anonymous
...