Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int *a = new int(100);
- int *ptr = (int*) a;
- cout << *a << endl;
- *ptr = 1000;
- cout << *a << endl;
- const int b = 100;
- int *c = (int*)&b;
- *c = 200;
- cout << &b << " " << b << endl;
- cout << c << " " << *c << endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement