new demo
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user