home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_11_07 / 1107120a < prev    next >
Text File  |  1993-05-06  |  312b  |  23 lines

  1. //
  2. // list.h - list interface using a nested class
  3. //
  4.  
  5. class list
  6.     {
  7. public:
  8.     list(unsigned n);
  9.     ~list();
  10.     void add(unsigned n);
  11.     void print();
  12. private:
  13.     struct node
  14.         {
  15.         node(unsigned n, node *p)
  16.             : number(n), next(p) { }
  17.         unsigned number;
  18.         node *next;
  19.         };
  20.     node *first, *last;
  21.     };
  22.  
  23.