Open Access needs Open Education and Vice-Versa
malariaworld.org1 pointsby mklencke0 comments
*(int *)vector_expand(v) = 2; typedef struct { void *elements; int elem_size; int n; } Vector;
Vector *vector_new(int elem_size);
void vector_free(Vector *v);
void vector_push(Vector *v, void *elem);
void vector_pop(Vector *v);
int vector_size(Vector *v);
void *vector_at(Vector *v, int i);
etc. This is off the top of my head, but you get the idea. You can basically put anything you want in there as long as you say how large the elements are upon initialization.