docs/Writerside/topics/compare.h.md

changeset 1318
12fa1d37fe48
parent 1174
ee473780cc0d
equal deleted inserted replaced
1317:eeb2fc3850e2 1318:12fa1d37fe48
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 ```

mercurial