I am trying to add some CLI functions to an existing C++ library. In one of the includes a class defines
includedHeader.h:
class IncludedClass
{
SomeType generic;
SomeType specific;
}
This code compiles in C++, but the generic member name is now recognized as a keyword. Is there some way to disable the new sintax from parts of the code?
Edit: the compiler error are
error C2059: syntax error : 'generic'
error C2238: unexpected token(s) preceding ';'
both referring to the line with "generic".
If you are linking the compiled library, you can do something like this:
#define generic __identifier(generic)
#include <includedHeader.h>
#undef generic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With