passing different structs to a function(using void *)
问题 I need to figure out how to pass two different structs to a function. I tried using void * for the parameter but i am receiving the error: warning: dereferencing 'void *' pointer error: request for member left in something not a structure or union same error for member right here is what i did in general terms(code may not compile). struct A{ char *a; struct A *left, *right; } *rootA; struct B{ char *b; struct B *left, *right; } *rootB; void BinaryTree(void *root, void *s){ if(condition) root