I want to be able to input the name of an already existing variable and then use that variable in a function. Is there a way to do this?
For example my code could look something like this:
int a = 1;
int b = 2;
char variableName;
std::cin >> variableName;
Is there a way I could then input "a" as variableName and then use the variable a in a function.