0
What is the difference between following two typedef statements? 1. typedef struct {int x; int y;} Point;
the second statement is : 2. typedef struct Pt {int x; int y;} Point; I hope the question is clear.
1 Odpowiedź
0
Using the second statement, you can use the type struct Pt as it is declared before the typedef.
In the first statement you use an anonymous structure so you will only be able to use it after (you will use Point).
The second statement is used for structures that use themselves as attributes.