typedef struct test { 
    int a;
}; 
int main(void) { 
test t; 
t.a = 3; 
} 
The above does not compile. However when I change the struct to:
typedef struct {
    int a; 
}test; 
Everything works fine. Why is this? I have seen plenty of code examples where the struct is on the same line as the typedef but it isn't compiling for me.
 
     
     
     
    