blob: ae63fc4e09828d6933d853a7fda84a7499a0d04a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef DYNAMIC_ARRAY_H_SENTRY
#define DYNAMIC_ARRAY_H_SENTRY
enum {
initial_size = 10
};
struct dynamic_array {
char *arr;
int last_element_index;
int allocation_size;
};
void dynarr_create_array(struct dynamic_array *array);
void dynarr_push_back(struct dynamic_array *array, int letter);
void dynarr_copy_array(struct dynamic_array *array, char *new_arr);
void dynarr_reset_array(struct dynamic_array *array);
void dynarr_clear(struct dynamic_array *array);
#endif
|