Given the following code:
typedef struct IntElement
{
struct IntElement *next; // use struct IntElement
int data;
} IntElement;
typedef struct IntElement
{
IntElement *next; // Use IntElement
int data;
} IntElement; // why I can re-use IntElement here?
I use above data structure to define a linked-list node.
- Which is better one?
- Why I can use duplicated name (i.e. struct IntElement and IntElement in the typedef end)?