preprocessor question

Started by
0 comments, last by SriLumpa 12 years, 6 months ago
is there anyways to have my compiler or preprocessor do the following with my code.


if (1)
everywhere there is a hardcoded C string add a .txt at the end?
else continue compilation
Advertisement

is there anyways to have my compiler or preprocessor do the following with my code.


if (1)
everywhere there is a hardcoded C string add a .txt at the end?
else continue compilation


Not that I know, but you did not mention the compiler.
I would suggest: if the change is definitive, to make it with external search/replace tools. Else, make it dynamically in the code, where/when it is needed.

Anyway, as many people could tell you:
- it's bad to hardcode a lot of things :)
- what are you trying to achieve ? give a small example

This topic is closed to new replies.

Advertisement