Static structure initialization with tags in C++
问题 I've searched stackoverflow for an answer but I cannot get something relevant. I'm trying to initialize a static structure instance with initial values by specifying their tags, but I get an error at compilation time: src/version.cpp:10: error: expected primary-expression before ‘.’ token Here's the code: // h typedef struct { int lots_of_ints; /* ... lots of other members */ const char *build_date; const char *build_version; } infos; And the faulty code: // C static const char *version_date