aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/main.c b/main.c
deleted file mode 100644
index 0c0b282..0000000
--- a/main.c
+++ /dev/null
@@ -1,36 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include "vector.h"
4
5int main(void){
6 vector_t vec = vector_init(16);
7
8 printf("The size of the vector is %d.\n", size(vec));
9 printf("The capacity of the vector is %d.\n", capacity(vec));
10 printf("is_empty returns: %d.\n", is_empty(vec));
11
12
13 printf("-----\n");
14
15 for (int i = 0; i < vec.max_size; i++){
16 if (i%2 == 0){
17 push(&vec, 5);
18 continue;
19 }
20 push(&vec, i);
21 }
22 print_vec(vec);
23 remove_val(&vec, 5);
24 /* for (int i = 0; i < vec.max_size; i++){ */
25 /* printf("pop: %d\n", pop(&vec)); */
26 /* delete_vec(&vec, 0); */
27 /* } */
28
29 printf("The size of the vector is %d.\n", size(vec));
30 printf("The first element of the vector is %d.\n", at(vec, 0));
31 printf("is_empty returns: %d.\n", is_empty(vec));
32 print_vec(vec);
33
34 destroy_vec(&vec);
35 return 0;
36}