I'm confused about this user defined data type.

Mar 26, 2015 at 8:10pm
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; 
  }; 
Mar 26, 2015 at 8:14pm
Is that C (rather than C++)?
Mar 26, 2015 at 9:32pm
myStruct is a synonym for struct type

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