I wrote a program that handles the buildcount of projects (gets called
every time I compile a project, it writes a header file which is
#include-ed in the project).
My question is this, is it possible to modify string constants with
preprocessor macros? for now I write every string I need as a #define
in the generated header, when in theory I only need to define the
buildcount there and put it then in the places where I need it.
#define BUILD 1
somewhere in the program I have string constant
char *version = "XYZ Version 2.3.21 Build X";
now I want to replace the X with the actual buildcount, but macros
inside quotationmarks don't work. Is there a way to somehow put the
quotationmarks around the string constant after the BUILD macro was
applied? With a macro?
I hope I made my problem clear, TIA :-)
if life throws you lemons make lemonade