Reputation: 43
Option 1:
typedef struct s{
int x;
double y;
char z;
}mystruct;
Option 2:
typedef struct {
int x;
double y;
char z;
}mystruct;
What's the difference between these 2 options?
Upvotes: 0
Views: 51
Reputation: 50775
With option 1 you can declare a variable like this:
struct s foo;
or
mystruct foo;
With option 2 the only possibility is:
mystruct foo;
Upvotes: 1