In C language, I'm using the following 2 macros of MAJOR_VERSION and MINOR_VERSION.
#define MAJOR_VERSION "0001"
#define MINOR_VERSION "0001"
I'd like to make a macro USER_AGENT consist of the above 2 macros of MAJOR_VERSION and MINOR_VERSION like following;
#define MAJOR_VERSION "0001"
#define MINOR_VERSION "0001"
#define USER_AGENT "miproduct/MAJOR_VERSION.MINOR_VERSION"
But the result of the expansion of the USER_AGENT macro is unexpected that MAJOR_VERSION and MINOR_VERSION are resting not expanded.
Is there any good way to make USER_AGENT string literal from MAJOR_VERSION and MINOR_VERSION macros? Thank you for your suggestion!