In my project I have lots of arrays of TResWord like rw2[] above. I get the following warning for each array. The warning message is:Code:struct TResWord { char *pString; // ptr to word string TTokenCode code; // word code }; static TResWord rw2[] = { {"do", tcDO}, {"if", tcIF}, {"in", tcIN}, {"of", tcOF}, {"or", tcOR}, {"to", tcTO}, {NULL}, };
warning: ISO C++ forbids converting a string constant to 'char*' Is there a way to keep the compiler happy?
maxcy / wt1v