Made the List generic, though more care needs to be taken when using it since memory leaks can happen when structs are used with it.

This commit is contained in:
2022-01-17 17:21:40 +00:00
parent 2c18b593ab
commit 929f2a7f4b
3 changed files with 58 additions and 48 deletions
+2 -2
View File
@@ -1,6 +1,7 @@
#ifndef LIST_H
#define LIST_H
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -14,8 +15,7 @@ typedef struct {
} List;
List* CreateList(void);
int AddListItem(const char *, List *);
void PrintList(const List*);
int AddListItem(const void *, size_t, List *);
void DestroyList(List*);
#endif