There is a Macro #define
buried deep in the libraries that I would like to quickly know the exact value of. Is there a way to store the value of the definition into a String so I could print it?
#define intgr 12
#define bnry 0b00000001
#define hex 0x0A
#define str "Hello World"
String myStr;
myStr = intgr;
cout<< myStr << endl; //Simple enough, work no problem
//12 <- actual
//12 <- expected
myStr = bnry; // using "bnry" would not work as #define does not touch inside quotes
cout<< myStr << endl;
//1 <- actual
//0b00000001 <- expected
myStr = hex;
cout<< myStr << endl;
//10 <- actual
//0x0A <- expected
myStr = str;
cout<< myStr << endl;
//Hello World <- actual
//"Hello World" <- expected, must include the quotation