Hello,
I want to create pre-formatted data within a constant struct within other struct, but I get the weird "braces around scalar initializer" from the compiler (Cygwin/warning).
The code is the following
Its php equivalent would be:Code:struct { char name[60]; int req; } tachs; const struct { char name[60]; struct tachs* tach[3]; } achv[] = { { "What", {//error is displayed here... { "Name1", 1000000 },//error is displayed here... { "Name2", 100000000 },//error is displayed here... { "Name3", 1000000000 },//error is displayed here... }//error is displayed here... }, { "Something", {//error is displayed here... { "Name1", 1 },//error is displayed here... { "Name2", 5 },//error is displayed here... { "Name3", 10 },//error is displayed here... } },//etc (there were more below in the same way as the ones above. };
I would like to know what I'm doing wrong, tried to google for the error but I didn't find any enlightenment.PHP Code:$arr = array( "Name", array( array("Name2","1"), array("Name2","2"), array("Name3","3") ), ...etc );
Thank you for your time.



LinkBack URL
About LinkBacks


