Developer community
0 votes
488 views
asked by | 488 views

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 by

Related questions

0 votes
1 answer
asked by sara Guru (24.6k points) 29 51 77 | 43 views
0 votes
2 answers
asked by anonymous | 46 views
+1 vote
1 answer
asked by anonymous | 90 views
0 votes
1 answer
0 votes
1 answer
asked by john Guru (27.1k points) 31 48 96 | 40 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users