Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void NextLast() {
- auto root = N(66, N(44, N(33), N(55)), N(88, N(77)));
- cout << root->value << endl;
- auto iter = begin(root.get());
- int i = 0;
- while (i < 6) {
- iter = next(iter);
- ++i;
- }
- ASSERT(!iter);
- }
- void NextStep() {
- auto root = N(66, N(44, N(33), N(55)), N(88, N(77)));
- cout << root->value << endl;
- auto iter = begin(root.get());
- while (iter) {
- cout << iter->value << " "s;
- iter = next(iter);
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement