Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class T {
- int a;
- };
- T *d=new T();
- d->a=4;
- void f(T *s) {
- cout<< s->a;
- s=new T();
- s->a=5;
- cout<< s->a;
- }
- f(d);
- cout<< d->a;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement