Last change
on this file since 49 was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
File size:
436 bytes
|
Line | |
---|
1 | #include "isllist.hpp" |
---|
2 | #include <stdio.h> |
---|
3 | |
---|
4 | isllist<int> tst; |
---|
5 | typedef isllist<int>::iterator p_int; |
---|
6 | |
---|
7 | main() |
---|
8 | { |
---|
9 | tst.insert(5); |
---|
10 | tst.insert(4); |
---|
11 | tst.insert(3); |
---|
12 | tst.insert(2); |
---|
13 | tst.insert(1); |
---|
14 | |
---|
15 | for ( p_int p = tst.begin(); p != tst.end(); ++p) |
---|
16 | printf("%d, ", *p); |
---|
17 | |
---|
18 | p_int x = tst.begin_prev(); |
---|
19 | if (tst.find_prev(x, 3)) |
---|
20 | tst.insert_next(x, 9); |
---|
21 | |
---|
22 | for ( p = tst.begin(); p != tst.end(); ++p) |
---|
23 | printf("%d, ", *p); |
---|
24 | |
---|
25 | tst.erase_all(); |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.