made work: inserting a value in a list at a given index
This commit is contained in:
+7
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user