1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #ifndef __LINKED_LIST_H__
#define __LINKED_LIST_H__
typedef struct _Node { // canonical name struct _Node
//int value; // v1: integers
//char* value; // v2: strings
void* a_value; // v3: anything
struct _Node* next; // need to use canonical name
} Node; // shortcut name: Node
void print_linked_list(Node* head, void (*print_value_fn)(void*));
void append(void* a_value, Node** a_head, Node** a_tail);
void destroy_linked_list(Node** a_head, Node** a_tail);
#endif /* __LINKED_LIST_H__ */
|
© Copyright 2022 Alexander J. Quinn This content is protected and may not be shared, uploaded, or distributed.