Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Which compiler and version are you using? as this is a pre-processor specific thing, I doubt there is a generic way of doing it and you'll have to resort to some tricks.
    – Neil
    Commented May 19, 2016 at 10:27
  • Most of the C compilers I used (back in the 90s) didn't allow #if within a #define (hence the problem you are having). Unless you can use boost (as per the other answer), which is a C++ library, then it's unlikely to be easily solvable.
    – Neil
    Commented May 19, 2016 at 10:30