#pragma once #include typedef struct treeset treeset_t; typedef struct treeset_node treeset_node_t; /* * Cast a and b to your custom struct and return: * 1 for greater than * -1 for less than * 0 for equal */ int treeset_demo_cmp(void *a, void *b) { if (*((int *)a) > *((int *)a)) return -1; if (*((int *)a) < *((int *)a)) return 1; return 0; } void treeset_destroy(treeset_t *set); void put(treeset_t *set, void *data, int (*cmp)(void *, void *)); // contains // remove