Jump to content
  • Advertisement
Sign in to follow this  
nuclear123

preprocessor question

This topic is 2458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!