In many places in code I have seen code like this:
typedef struct Name_of_Struct{
//Things that the struct holds
} Name_of_Struct;
I don't seem to understand why such a declaration? Why is a struct typedef
'ed to its own name? Isn't it like saying typedef Name_of_struct Name_of_Struct;
? I know there must be some reason behind such a declaration, as such instances of code are seen in good and highly used code bases like SDL.