//  (C) Porkolab 2003   
//
//  A.4.4.
//   
//  Creation of subobjects


class list
{
public:
     list();
    ~list();

    // ...
private:
    // this order is the relevant:
    int  id;
    list *next;
    list *prev;
};


// will be automatically rearranged: id(nid), next(0), prev(0)
list::list() : id(nid), prev(0), next(0)
{
    ++nid;
}