diff options
-rw-r--r-- | ll.c | 9 | ||||
-rw-r--r-- | ll.h | 12 |
2 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,9 @@ +#include <stdlib.h> +#include "ll.h" + +llnode* appendll(llnode* tail, char* str){ + llnode* new = malloc(sizeof(llnode)); + if (tail != NULL) tail->next = new; + new->str = str; + return new; +} @@ -0,0 +1,12 @@ +#ifndef _LL_INCLUDE +#define _LL_INCLUDE +#include <stdbool.h> + +typedef struct llnode { + char* str; + struct llnode* next; +} llnode; + +llnode* appendll(llnode* tail, char* str); + +#endif |