home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_07
/
1107121a
< prev
next >
Wrap
Text File
|
1993-05-06
|
347b
|
25 lines
//
// list.h - list interface using a friend class
//
class listnode
{
friend class list;
listnode(unsigned n, listnode *p)
: number(n), next(p) { }
unsigned number;
listnode *next;
};
class list
{
public:
list(unsigned n);
~list();
void add(unsigned n);
void print();
private:
listnode *first, *last;
};