In my C++ .h
file:
class foo {
#define useThis true
...
}
In my .cpp
file:
#if useThis
... generate A code
#else
... generate B code
#endif
The problem is that the #define
values are not being read in the .cpp
file, so what is happening is both A and B are being generated.
I am including the .h
file in the top of the .cpp
file.