Derive-C
Loading...
Searching...
No Matches
readme.c File Reference
Include dependency graph for readme.c:

Go to the source code of this file.

Macros

#define CAPACITY   2048
#define SELF   alloc_2048
#define T   char
#define ALLOC   alloc_2048
#define SELF   vec_char

Functions

int main ()

Macro Definition Documentation

◆ ALLOC

#define ALLOC   alloc_2048

Definition at line 8 of file readme.c.

◆ CAPACITY

#define CAPACITY   2048

Definition at line 3 of file readme.c.

◆ SELF [1/2]

#define SELF   alloc_2048

Definition at line 4 of file readme.c.

◆ SELF [2/2]

#define SELF   vec_char

Definition at line 4 of file readme.c.

◆ T

#define T   char

Definition at line 7 of file readme.c.

Function Documentation

◆ main()

int main ( )

Definition at line 12 of file readme.c.

12 {
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}