Name: Anonymous 2010-02-24 22:19
Hello all, I am creating a program which has a linked list. The linked list contains 2 different structs: variable, and function. For a while I was connecting the lists by using void pointers and using casts to get their data, e.g.:
Basically, I am placing functions in the same list as variables and vice-versa. I was wondering, would it be better to just place them in separate lists? Is it not worth the trouble to do it my way?
void *previous, *next;
((struct variable *)temp->previous).Basically, I am placing functions in the same list as variables and vice-versa. I was wondering, would it be better to just place them in separate lists? Is it not worth the trouble to do it my way?