This commit is contained in:
Odweta
2023-12-21 13:31:10 +01:00
parent eb6b6c8343
commit 784fd0d35d
3 changed files with 34 additions and 51 deletions
+6 -19
View File
@@ -1,29 +1,16 @@
#include <odweta/vector.h>
#include <odweta/file.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv) {
vector_t *vv = vectorInit(VECTOR);
vector_t *fv = vectorInit(FLOAT);
vectorPrint(vv);
vector_t *v = vectorInit(VECTOR);
vectorPush(fv, &(float){3.14});
vectorPush(fv, &(float){5.123});
vector_t *floatv = vectorInit(FLOAT);
vectorPush(vv, fv);
vectorPush(vv, fv);
vectorPush(vv, fv);
vectorPush(floatv, &(float){3.14});
vectorPush(floatv, &(float){55.5});
vectorPush(fv, &(float){156.1});
vectorPush(fv, &(float){6.124});
vectorPush(v, floatv);
vectorInsertAt(vv, 1, fv);
vectorPrint(vv);
vectorCleanup(vv);
vectorCleanup(fv);
vectorPrint(v);
return 0;
}