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.

4
  • 2
    I don't think you can have a macro expand to #ifdefs; the expansion isn't scanned for conditionals. Commented Jun 12, 2021 at 18:14
  • you can make function and match macro's corresponding value in if condition and do whatever you want if comes true Commented Jun 12, 2021 at 18:23
  • Do not tag both C and C++ except when asking about differences or interactions between the languages. If you want answers for both languages, you can ask separate questions. Pick one tag and delete the other. Commented Jun 12, 2021 at 19:26
  • looks like you dont know about #undef Commented Jun 13, 2021 at 0:43