Hello! I’m having compile errors about a bool conversion error, though there is no bools in any of my code, and the return type of my function which the code resides in is also not a bool, either.
int path(std::string input, int type) {
if (type == 0 and input == "L") {
return 1; //player selected left
} else if (type == 0 and input = "R") {
return 2; //player selected right
}
}
I’ve tried using &&
and and
to make this code work, but it expects a bool conversion for the std::string input
variable. I don’t know what’s causing the error, and I don’t want to switch the function to a bool so I can add more return numbers.
If anyone can help, that would be great, Thanks!!