Output filename can not be defined from source code, but only from build environment.
If you use Visual Studio IDE, you can create multiple configurations, each with different #define constants (preprocessor defitions under confuration properties->(language) and a different output directory. If you require the exe filename format you've specified you can perform a copy as a post-build step.
Another way would be to build using makefiles; this will give total control over dependencies and output files be it at a very high initial effort to master and create makefiles.
Note: I've checked this for Visual Studio 2008 express edition / C++