struct Node {
void *content;
struct Node *next;
};
void insert(struct Node **list, void *content) {
struct Node *newNode = (struct Node *) malloc(sizeof(struct Node));
newNode-%26gt;content = content;
newNode-%26gt;next = *list;
// update list pointer
*list = newNode;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment