home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_07
/
1107122a
< prev
next >
Wrap
Text File
|
1993-05-06
|
412b
|
26 lines
//
// list.h - list interface using a nested class
// with member definitions outside the nested class
//
class list
{
public:
list(unsigned n);
~list();
void add(unsigned n);
void print();
private:
struct node
{
node(unsigned n, node *p);
unsigned number;
node *next;
};
node *first, *last;
};
inline list::node::node(unsigned n, node *p)
: number(n), next(p) { }