Can someone tell me how these things work?
struct StructName foo[] =
{
[0] =
{
var1: "blah",
var2: 1,
},
[1] =
{
var1: "bleh",
var2: 2,
var3: 0x04,
},
Quote:
};
Namely, the "[n] ="s before every element and those "var1:", "var2:"s inside
the element declarations that shows the variables' names. I recently saw
this in a Linux program and thought it was pretty cool, but when I tried it
in my own program, VC++ complained about both syntaxes. How do they work?
Do they have a name? Is this a C++ syntax? What happens to var3 in element
0? Aren't those trailing commas illegal? Thanks!
[struct StructName is defined like an ordinary struct]
--
Atsushi Nakagawa
Unrelated messages will not be accepted by this mailbox.