summaryrefslogtreecommitdiff
path: root/doc/aapl/ex_dlistmel.cpp
blob: e003a7d883d2d42b6ed137dc1b1de9f6d20520fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "dlistmel.h"

struct ListEl;

struct ListEl1 { ListEl *prev, *next; };
struct ListEl2 { ListEl *prev, *next; };

struct ListEl :
        public ListEl1,
        public ListEl2
{
    // Element customizations
    int data;
};

int main()
{
    DListMel<ListEl, ListEl1> list1;
    DListMel<ListEl, ListEl2> list2;
    list1.append( new ListEl );
    list2.append( list1.head );
    return 0;
}