HI I donot understand where to start . I need ideas and help.

void InsertList(c4735list *destinationList,c4735list *sourceList,node *startNode)
   //=====================not implementd yet

this fn inserts source list into destination list.the nodes are inserted after the startnode in destination list.source list should be an empty list after this operation. the current pointer should be set to the head of the list.

typedef struct _node
    struct _node *prev, *next;
    void *data;
} node;

typedef struct _c4735list
    node *head, *tail;
    node *current;
    void (*cleanupData ) (void *); // function that knows how to clean up data
} c4735list;

Recommended Answers

All 2 Replies

So, show your code doing this. You only show the structure of the list and node structures.

#define LIST_FOREACH(L, S, M, V) node *_node = NULL;\
   node *V = NULL;\
    for(V = _node = L->S; _node != NULL; V = _node = _node->M)

I am iterating through sec list

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.