Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct
- {
- short s;
- int i;
- struct Ss
- {
- short s;
- };
- } S;
- error C2020: 's' : 'struct' member redefinition
- typedef struct
- {
- short s;
- union U
- {
- int uu;
- };
- struct S
- {
- short ss;
- };
- union
- {
- int i;
- double d;
- };
- } A;
- A a = {1, 2, 3, 4};
- printf("A.s=%d A.uu=%d A.ss=%d A.i=%d n", a.s, a.uu, a.ss, a.i);
- A.s=1 A.uu=2 A.ss=3 A.i=4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement