I'm confused about this user defined data type.

What exactly does this do? So far I understand that it is defining a structure type as type, but I'm getting confused about what myStruct does or is.

1
2
3
4
5
6
7
8

  typedef struct type myStruct;
  struct type 
  {
   int x; 
   myStruct *y; 
  }; 
Is that C (rather than C++)?
myStruct is a synonym for struct type

Line 6 is effectively:
 
  struct type * y;
Topic archived. No new replies allowed.