Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- struct list
- {
- char v = 0;
- list *n = NULL;
- };
- int main()
- {
- list *p = new list {1, new list};
- p->n = new list { 2, new list };
- p->n->n = new list { 3, NULL };
- list t = *p;
- delete p;
- p = t.n;
- return 0 * _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement