Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int mem = 1;
- class Vect {
- public:
- int &operator*() const {
- return mem;
- }
- void change(Vect &s, const Vect &t) {
- *t = *s + *t;
- }
- };
- int main() {
- /*
- Vect a = Vect();
- const Vect b = Vect();
- a.change(a, b);
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement