12345678910111213141516171819202122232425 |
- #include <stdio.h>
- #include <ell/vec.h>
- int main(void)
- {
- struct ell_vec_int v;
- ELL_VEC_INIT(&v);
- ELL_VEC_RESERVE(&v, 10); /* not necessary */
- for (int i = 0; i < 10; i++) {
- ELL_VEC_PUSH(&v, i);
- }
- while (ELL_VEC_SIZE(&v) > 0) {
- printf("TOS: %d\n", ELL_VEC_BACK(&v));
- ELL_VEC_POP(&v);
- }
- ELL_VEC_RESET(&v);
- }
|