This relates to my last post about using an offset to select a sort field from a linked list node.
If the the field selected is an int, and the offset into the node struct is 20, how can I get this int out? I would have thought it would have been as simple as:
orCode:node *np; int *ptr=&np+20;
or about 45 other things I've tried. Placing a char* is as simple as:Code:int *ptr=(int*)np+20;
I guess I don't work with numbers enough...Code:node *np; char *ptr=(char*)np+20;