10 |
10 |
11 In the following example we use `cx_cmp_int32` as compare function for a `CxList` of `int32_t` values. |
11 In the following example we use `cx_cmp_int32` as compare function for a `CxList` of `int32_t` values. |
12 |
12 |
13 ```C |
13 ```C |
14 CxList *list = cxArrayListCreate( |
14 CxList *list = cxArrayListCreate( |
15 cxDefaultAllocator, // use the default stdlib allocator |
15 cxDefaultAllocator, // use the default allocator |
16 cx_cmp_int32, // the compare function for the elements |
16 cx_cmp_int32, // the compare function for the elements |
17 sizeof(int32_t), // the size of one element |
17 sizeof(int32_t), // the size of one element |
18 256 // reseve space for 256 elements |
18 256 // reseve space for 256 elements |
19 ); |
19 ); |
20 ``` |
20 ``` |