Sameer Khateeb
Sameer Khateeb

Reputation: 9

Macros in c & C++

Is it possible to define or undefine macros during runtime.

Upvotes: 0

Views: 134

Answers (1)

Marcelo Cantos
Marcelo Cantos

Reputation: 185852

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).

Upvotes: 11

Related Questions