Reputation: 44154
In C I often see structs init'ed like this:
struct size aSize;
aSize.x = 100;
aSize.y = 42;
But in other languages you can create struct "like" data structures in one line like:
aSize = {
x : 100,
y : 42
};
Is a similar syntax supported in C?
I understand that Javascript's "struct" like data structure is really a hash without defined params, i'm just trying to show the syntax
Upvotes: 2
Views: 1174