In order to declare a struct in C, I have been using
typedef struct Foo Foo;
and then defining it at some point below.
Why do I have to specify the name of the struct (Foo) twice?
>Solution :
The format is
typedef old_type new_type
so for
typedef struct Foo Foo;
struct Foo is the old type and Foo is the new type, so whenever you type Foo it is really an alias for struct Foo.