Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121661435
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, Jul 12, 22:26
Size
212 B
Mime Type
text/x-c++
Expires
Mon, Jul 14, 22:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27369634
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