On executing the following code using 'Macro Definitions Set 1', I encounter the error "C2065: 'C1' : undeclared identifier".
While using 'Macro Definitions Set 2', the code runs to give an output of 2.
I am guessing it has something to do with preprocessor tokenization. Please Explain.
#include <iostream>
// Macro Definitions Set 1
#define A 1
#define D(n) B(n)
#define B(n) C##n
#define CA 2
// Macro Definitions Set 2
//#define A 1
//#define D(n) C##n
//#define CA 2
int main ()
{
printf ("%d", D(A));
}