I was wondering if there was any way, if possible, to retrieve the variable contents? For example:
That code outputs "variable2", but I want it to output the contents of "variable2" (I'm using this in a loop where I have an array with different variable names, so thats why I cant just replace variable1 with variable2 in the above example.)Code:
const char* variable1 = "variable2";
const char* variable2 = "test";
std::cout << variable1;
Any help is greatly appreciated. Thanks.