WvStreams
Docs
sgmlmanual
egfiles
intlistex.cc
1
#include "wvstringlist.h"
2
#include "wvhashtable.h"
3
#include <stdio.h>
4
5
DeclareWvList(
int
);
6
//Declaration of list of integers
7
8
int
main()
9
{
10
11
int
a=5, b=6;
12
13
intList l;
//the list
14
15
16
intList::Iter i(l);
//the iterator
17
18
l.add(&a,
false
);
19
l.add(&b,
false
);
20
21
for
(i.rewind(); (i.next()) ; )
22
printf(
"Foo: %d\n"
, i());
23
24
//prints:
25
//Foo: 5
26
//Foo: 6
27
28
29
return
0;
30
}
Generated by
1.8.17