Structures are supposed to have a name:
struct StructName {
// stuff
};
Typedefs take a type and give it a name:
typedef SomeType NameYouWannaGiveThatType;
The third example combines these.
The example is an unnamed struct, which some compilers get upset about.
The second example is a named struct but you traditionally couldn't refer to it without including the word struct. eg
struct MyStruct {
//...
};
MyStruct iffy; // Not allowed in C, in my experience anyway
struct MyStruct good; // No problem.
I haven't found this to be a problem in C++, but I'm sure there's people out there who know the C++ spec backwards and will give you a better answer. Anyway, you get around this with typedef.
typedef MyStruct { /* etc */ } MyStruct;
MyStruct s;
Personally, and this is probably just a matter of style, I prefer to not to use the same name:
typedef MyStruct { /* etc */ } SMyStruct;