Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass {
- // various stuff including ...
- double *myarray;
- public:
- double &operator() (const int n){
- return myarray[n];
- }
- double operator() (const int n) const{
- return myarray[n];
- }
- // various other stuff ...
- };
Advertisement
Add Comment
Please, Sign In to add comment