I encountered a problem in reading a piece of C code. code show as below :
#define size_of_attribute(Struct, Attribute) sizeof(((Struct*)0)->Attribute)
The function of this macro function is gets the length of the attribute in the struct. I know what this function is for, but i can't understand the meaning of "((Struct*)0)
".
I will appeaciate If you can give me some explanation :).