made work: inserting a value in a list at a given index

This commit is contained in:
Odweta
2023-12-24 12:55:56 +01:00
parent 342ad58b51
commit 7233f8c8af
5 changed files with 97 additions and 83 deletions
+7 -5
View File
@@ -17,12 +17,14 @@ typedef struct {
vector_t* data; // vector of vectors
} list_t;
list_t* listInit(); // returns a new list
list_t* listInit(); // returns a new list
void listPush(list_t* l, dataType_e type, void* element); // appends an element at the end of a list
void listPush(list_t* l, dataType_e type, void* element); // appends an element at the end of a list
void listPrint(list_t* l); // prints a list
void listPrint(list_t* l); // prints a list
void listCleanup(list_t* l); // freeing pointers
void listCleanup(list_t* l); // freeing pointers
void* listPop(list_t* l); // popping the last value of the list and returning it
void* listPop(list_t* l); // popping the last value of the list and returning it
void listInsertAt(list_t* l, int index, dataType_e type, void* element); // inserts an element at a given index