From ee6f7027510d8234e5d5c3c78387ec80d69e46c1 Mon Sep 17 00:00:00 2001 From: Odweta Date: Tue, 6 Feb 2024 22:07:39 +0100 Subject: [PATCH] this still does not work though --- demo.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/demo.c b/demo.c index 4761cce..97d5192 100644 --- a/demo.c +++ b/demo.c @@ -1,14 +1,20 @@ #include +#include int main() { - vector_t *v = vector_new(INT); + string_t *s = string_from("test string"); + string_t *s2 = string_from("another test"); - vector_push(v, &(int){1}); - vector_push(v, &(int){2}); - vector_push(v, &(int){3}); + vector_t *v = vector_new(STRING); + + vector_push(v, s); + vector_push(v, s2); vector_print(v); + string_cleanup(s); + string_cleanup(s2); + vector_cleanup(v); return 0;