Hey all,
Hopefully this is a simple question for someone with more void* experience than me.
Say I have a data structure:
and a function which takes a pointer to this structure as an input. Because of the 'type' variable, I know what the void pointer contains and would like to dereference it.Code:typedef struct sp_cntl_tag { void* pad; uint8 type; uint8 index; } sp_cntl_t
How do I dereference a void* from a structure? My instinct was to do something like
but this didn't work... suggestions?Code:sp_cntl_t* temp; desiredType = *temp->(typecast)pad;