made work: removeAtIndex(x);

This commit is contained in:
Odweta
2023-12-25 01:34:00 +01:00
parent c5ffbb9e89
commit b00858c9be
5 changed files with 86 additions and 3 deletions
+24 -2
View File
@@ -8,12 +8,34 @@ int main() {
listPush(another_list, CHAR, &(char){'x'});
listPush(another_list, INT, &(int){123});
listPush(another_list, FLOAT, &(float){3.14});
listPush(another_list, LIST, another_list);
listPush(another_list, LIST, another_list);
printf("do not put the list into itself, it does weird stuff\n");
// BIG NONO -> listPush(another_list, LIST, another_list);
listRemoveAt(another_list, 1);
list_t* l = listInit();
listPush(l, INT, &(int){5+2});
listPush(l, INT, &(int){5*2});
listPush(l, FLOAT, &(float){5/2});
listPush(another_list, LIST, l);
listPrint(another_list);
listCleanup(another_list);
// vector_t* v = vectorInit(INT);
//
// vectorPush(v, &(int){123});
// vectorPush(v, &(int){456});
// vectorPush(v, &(int){789});
//
// vectorRemoveAt(v, 1);
//
// vectorPrint(v);
//
// vectorCleanup(v);
return 0;
}