Question about typdef/struct

How is typedef struct Name { /* ... */ } Name; special?
To me it seems like writing something like typedef Type Type; which seems pointless.
You are correct.

The typical reason to do that is to handle self-referential cases:
1
2
3
4
5
6
7
8
typedef struct node_tag
  {
  int x, y;
  node_tag* next;
  }
node_t;

node_t* head_point;  // head node of a linked list 
Topic archived. No new replies allowed.