Derive-C
Loading...
Searching...
No Matches
readme.c
Go to the documentation of this file.
1#include <stdio.h>
2
3#define CAPACITY 2048
4#define SELF alloc_2048
6
7#define T char
8#define ALLOC alloc_2048
9#define SELF vec_char
11
12int main() {
13 alloc_2048 alloc = alloc_2048_new();
14 vec_char vec = vec_char_new(&alloc);
15
16 for (char x = 1; x <= 9; x++) {
17 vec_char_push(&vec, (char)('0' + x));
18 }
19
20 vec_char_iter_const iter = vec_char_get_iter_const(&vec);
21 char const* entry;
22 while ((entry = vec_char_iter_const_next(&iter))) {
23 printf("entry: %c\n", *entry);
24 }
25
26 vec_char_delete(&vec);
27}
int main()
Definition readme.c:12