home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_03
/
8n03109a
< prev
next >
Wrap
Text File
|
1990-03-20
|
498b
|
30 lines
*****Listing 1*****
#include <stream.hpp>
#include "list.hpp"
main()
{
LIST ilist;
int i,size,*iptr;
for(i = 0 ; i < 10 ; ++i)
{
cout << "Adding " << i << "\n";
ilist.add_tail(&i, sizeof(i));
}
cout << "\n";
iptr = ilist.get_head(size);
while(iptr != NULL)
{
cout << "Retrieved " << *iptr << "\n";
iptr = ilist.get_next(size);
}
}