There must be a way to do this ...
I have a header file, version.h with one line ...
#define VERSION 9
and several files use a specific VERSION as an integer. It's fine.
Without changing the way VERSION is defined, I need to create an initialized "what" string that contains this value, so I need something like this ...
char *whatversion = "@(#)VERSION: " VERSION;
obviously this doesn't compile, so somehow I need to get a string of the preprocessed VERSION value, essentially giving this ...
char *whatversion = "@(#)VERSION: " "9";
Any ideas? Is it possible?
source
share