Changing a macro at runtime in C

Macros are replaced by the preprocessor by their value before your source file even compiles. There is no way you’d be able to change the value of the macro at runtime.

If you could explain a little more about the goal you are trying to accomplish undoubtedly there is another way of solving your problem that doesn’t include macros.

Leave a Comment