#include #include #include "vector.h" int main(void){ vector_t vec = vector_init(16); printf("The size of the vector is %d.\n", size(vec)); printf("The capacity of the vector is %d.\n", capacity(vec)); printf("is_empty returns: %d.\n", is_empty(vec)); printf("-----\n"); for (int i = 0; i < vec.max_size; i++){ if (i%2 == 0){ push(&vec, 5); continue; } push(&vec, i); } print_vec(vec); remove_val(&vec, 5); /* for (int i = 0; i < vec.max_size; i++){ */ /* printf("pop: %d\n", pop(&vec)); */ /* delete_vec(&vec, 0); */ /* } */ printf("The size of the vector is %d.\n", size(vec)); printf("The first element of the vector is %d.\n", at(vec, 0)); printf("is_empty returns: %d.\n", is_empty(vec)); print_vec(vec); destroy_vec(&vec); return 0; }