Posted By: tzw
struct's struct? - 04/30/11 10:56
hi,everybody. a question make me confused? is a struct can directly have a member struct.i mean DO NOT use a pointer. someone can tell me about it?
typedef struct { int a, b; float c; STRING* d; } STRUCT_A; typedef struct { int e, f; BMAP* h; STRUCT_A aaa, bbb; } STRUCT_B; void main () { STRUCT_B test; test.aaa.a = 10; test.bbb.b = 2; test.aaa.a *= test.bbb.b; // works printf("test.aaa.a = %d", test.aaa.a); }