blob: 5ab3dc38f6f9f0fe2d5a8256e2511b82a4f3d80d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef VECTOR_H
#define VECTOR_H
typedef struct vector vec;
/*constructors*/
vec* vec_new();
vec* vec_with_capacity(int);
/*management*/
int vec_size(vec*);
vec* vec_cp(vec*);
void vec_print(vec*, char* (void*));
/*data*/
void vec_push(vec*, void*);
void* vec_pop(vec*);
void* vec_index(vec*, int);
/*memory*/
void vec_clear(vec*);
void vec_free(vec*);
#endif
|