How would I print the date and time for the purposes of the build. Ie: When the console for my application starts up I want to do this:
Binary B
Similar to Virne's answer I created a simple header file called "BuildDate.h" with the following contents:
#define BUILD_DATE __DATE__ " " __TIME__
I touch the file using GnuWin32 touch command in my pre-build event:
touch.exe BuildDate.h
Then I include the header file in any code where I want access to the BUILD_DATE string. E.g.:
#include "BuildDate.h"
...
logger->Log("Build Date: " BUILD_DATE);