blob: 98491ea9c2c4f0ac86f6ea01b75e8a3177c3d4ef (
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_drop_word(struct dynamic_array *array);
void dynarr_clear(struct dynamic_array *array);
#endif
|