I\'m trying to figure out how I can concatenate a #define\'d int to a #define\'d string using the C Preprocessor. My compiler is
#define
You can do that with BOOST_PP_STRINGIZE:
#define MAJOR_VER 2 #define MINOR_VER 6 #define MY_FILE "/home/user/.myapp" BOOST_PP_STRINGIZE(MAJOR_VER) BOOST_PP_STRINGIZE(MINOR_VER)