That may be valid C99 syntax but it's not valid C++03 syntax. Creator only supports C++.
/s/ Adam On Thu, Jul 15, 2010 at 5:43 PM, Danny Price <[email protected]> wrote: > I'm using Creator 2.0 with a C99 program and have the following demo > structure: > > typedef struct > { > char name[20]; > int ID; > int age; > FILE *record; > } > Employee; > > Employee emp = {.ID=0, .record=NULL}; > > This is valid C99 code but Creator underlines the initializer line in red > with the error 'expected token '} ' got '.' > > Is this a bug? The code compiles fine without errors. > > I'm using GCC 4.2 on OS 10.6.2 and have added the QMAKE_CFLAGS += -std=c99 to > the .pro file. > > > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator > _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
