Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120990973
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
Tue, Jul 8, 05:14
Size
212 B
Mime Type
text/x-c++
Expires
Thu, Jul 10, 05:14 (2 d)
Engine
blob
Format
Raw Data
Handle
27275603
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