access element of struct passed into a void* pointer
问题 I'm working with a binary search tree data structure to sort a series of structs with the type definitions: typedef struct { char c; int index; } data_t; typedef struct node node_t; typedef node { void *data; node_t *left; node_t *right; } The node_t typedef is from a library provided to me for this purpose, presumably with a void* pointer to ensure polymorphism. node will be passed into the function: static void *recursive_search_tree(node_t *root, void *key, int cmp(void*,void*)) Within the