Since a switch statement doesn't take in a string what other than a switch statement is there that I should use. Is there anything that I could use which won't require me to write a ton of if statements? Or is there a way to make switch statements take in a string? I need another way other than a switch statement so I can check for multiple ( > 20) different cases.
vector<string> tokens;
string present;
while(....){
string right_value = right->evaluate(); <-- finds out what the string to the right of present is
string left_value = left->evaluate(); <-- finds out what the string to the left of present is.
switch(present){
case "write" : return right_value;
.
.
.
.
.
}