Reputation: 561
I recently encountered text of the form
struct {
double a, b, c;
}[123];
What exactly does this do? Is this even proper C?
Upvotes: 3
Views: 211
Reputation: 106012
What exactly does this do? Is this even proper C?
This is an ill formed code. Compiler will raise syntax error. There should be an identifier before [123]
.
struct {
double a, b, c;
} a[123];
This will declare a
as an array of 123 struct { double a, b, c; }
.
Upvotes: 3