I code C++ using MS Dev Studio and I work from home two days per week. I use CVS to keep my sources synchronized between the two computers but there are difference between the environments the machines are in.
Can anyone suggest a way I can conditionally modify constants in my code depending on whether I am compiling on my home box or not ?
What I am after is a way of defining a symbol, let's call it _ATHOME, automatically so I can do this:
#ifdef _ATHOME
# define TEST_FILES "E:\\Test"
# define TEST_SERVER "192.168.0.1"
#else
# define TEST_FILE "Z:\\Project\\Blah\\Test"
# define TEST_SERVER "212.45.68.43"
#endif
NB: This is for development and debugging purposes of course, I would never release software with hard coded constants like this.