Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78976330
operator.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 24, 02:15
Size
212 B
Mime Type
text/x-c++
Expires
Mon, Aug 26, 02:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20130508
Attached To
R9360 PCSC_git
operator.cpp
View Options
#include <iostream>
class
A
{
public
:
int
operator
[](
int
i
)
{
// modifies the behavior
return
values
[
i
]
*
2
;
}
private
:
int
values
[
100
];
};
int
main
()
{
A
a
;
std
::
cout
<<
a
[
2
]
<<
std
::
endl
;
}
Event Timeline
Log In to Comment