I have such a macro (not quite, but the function is completely equivalent):
#define STRUCTMEMBER(Member,Value) GlobalStructInstance. ## Member = Value ... STRUCTMEMBER(Item,1);
This works fine in Visual C ++, but gcc 3.4.5 (MingGW) gives the following error:
insert "." and "Item" does not give a valid pre-processing token
This also happens when I use the "->" operator. I did not find hints of concatenation that the use of these operators is prohibited.
Does anyone have any ideas?
gcc c-preprocessor visual-c ++ stringification
Florian storck
source share