0

Is it possible to define or undefine macros during runtime.

1
  • MACROS are expanded before compilation time, so they essentially "dissolve" into the code beyond recognition. On a side note, even though your question is in the "c" realm, I'll take a shot at my prophetic abilities and suggest using any one of C++'s polymorphism. Commented Mar 6, 2011 at 9:43

1 Answer 1

11

No. Macros are a preprocessor mechanism, and are fully resolved even before the compiler executes.

Their purpose is to alter the source code that the compiler sees, so they don't even exist at runtime (let alone permit modification).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.