Here is a more complete example showing the use of ## (some of it creative!)
Code:
#include <stdio.h>
#define FLOAT(x,y) x ## . ## y
#define Symbol(x) Prefix_ ## x ## _PostFix
#define __SymbolName(x) #x
#define _SymbolName(x) __SymbolName(x)
#define SymbolName(x) _SymbolName(Symbol(x))
#define PI FLOAT(3, 141592)
int main()
{
char *Symbol(P) = SymbolName(P);
printf("PI=%f, Symbol= %s\n", PI, Symbol(P));
return 0;
}
It compiles and produces what I expected from the executable.
Of course, it's all pretty meaningless.
--
Mats