In C code, I\'ve seen the following:
typedef struct SomeStructTag {
// struct members
} SomeStruct;
I\'m not clear on why this is any d
The reason is that struct tags and typedef names are in different namespaces in C. You can only use a struct tag after the keyword struct, so it is handy to know which is which.
In C++ they are in the same namespace so the issue doesn't arise. Which also means your second example may not be legal C++. Your first example is legal in both languages.