Possible Duplicates:
Why should we typedef a struct so often in C?
Difference between ‘struct’ and ‘typedef struct’ in C++?
What is the difference between the following type declarations?
struct Person
{
int age;
};
typedef struct
{
int age;
}Person;
I understand that
struct
{
int age;
}Person;
Creates and instance of an unnamed struct called person, where
struct Person
{
int age;
};
declares a type called person, but not an instance. But I still dont get what the typedef does.