Advertisement
Guest User

Untitled

a guest
May 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int mem = 1;
  4.  
  5. class Vect {
  6. public:
  7.     int &operator*() const {
  8.         return mem;
  9.     }
  10.     void change(Vect &s, const Vect &t) {
  11.         *t = *s + *t;
  12.     }
  13. };
  14.  
  15.  
  16.  
  17. int main() {
  18.     /*
  19.     Vect a = Vect();
  20.     const Vect b = Vect();
  21.     a.change(a, b);
  22.     */
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement