22 lines
442 B
C
22 lines
442 B
C
#include <fx/collections/array.h>
|
|
#include <fx/int.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
fx_array *array = fx_array_create();
|
|
fx_array_append(array, fx_int_create(32));
|
|
fx_array_append(array, fx_int_create(64));
|
|
fx_array_append(array, fx_int_create(128));
|
|
|
|
fx_iterator *it = fx_iterator_begin(array);
|
|
fx_foreach_ptr(fx_object, obj, it)
|
|
{
|
|
printf("object %p\n", obj);
|
|
}
|
|
fx_iterator_unref(it);
|
|
|
|
fx_array_unref(array);
|
|
return 0;
|
|
}
|