Alternative Titles (to aid search)
- Convert a preprocessor token to a string
- How to make a char string from a C
What you need are the # and ## operators, and automatic string concatenation.
The # preprocessing operator turns the macro parameter into a string. The ## operator pastes two tokens (such as macro parameters) together.
The possibility that comes to mind to me is
#define IV_DOMAIN domain.org
#define IV_SECURE(DOMAIN) "secure." #DOMAIN
which should change IV_SECURE to
#define IV_SECURE "secure." "domain.org"
which will automatically concatenate to "secure.domain.org" (assuming the phases of translation are the same in C as C++).
ANOTHER EDIT: Please, please read the comments, which show how I've managed to get confused. Bear in mind that I am thoroughly experienced in C, although perhaps a touch rusty. I would delete this answer, but I thought I'd leave it as an example of how easy it is to get confused by the C preprocessor.