Peter Williams a écrit:
I am using DevC++ & MinGW for GRX. If I have a defined constant 'white' (as a color index) then attempt to use GrWhite() a "parse error before numeric constant" is reported. E.g.
#include <grx20.h> #include <grxkeys.h>
#define white 0
GrColor White;
int main(void) { GrSetMode(GR_default_graphics); White = GrWhite();/* gives "parse error before numeric constant" */
/* White = GrAllocColor(255,255,255); */ return(0); }
If I remove my 'define' all is well, as is if I use GrAlloc instead of GrWhite.
I find in grx20.h
#define GrWhite() ( \ (GrColorInfo->white == GrNOCOLOR) ? \ (GrWhite)() : \ GrColorInfo->white \
and you redefine white so that the second line becomes
(GrColorInfo->0 == GrNOCOLOR) ? \
???
Maurice