S
shea martin
Is there a way to keep track of a build number within a program?
Essentially incrementing a #define everytime the program is compiled (at
link time would be even better, though tougher to implement).
something like __DATE__ or __TIME__, perhaps __BUILD__?
i.e.,
void printVersion() const { cout << "My Program\n(build __BUILD__)\n"; }
I suppose that the last value inserted for __BUILD__ would have to be
maintained somewhere.
Does anyone have a cute solution?
Essentially incrementing a #define everytime the program is compiled (at
link time would be even better, though tougher to implement).
something like __DATE__ or __TIME__, perhaps __BUILD__?
i.e.,
void printVersion() const { cout << "My Program\n(build __BUILD__)\n"; }
I suppose that the last value inserted for __BUILD__ would have to be
maintained somewhere.
Does anyone have a cute solution?