Evaluate a string with a switch in C++ [duplicate]
I want to evaluate a string with a switch but when I read the string entered by the user throws me the following error. error: invalid cast from type ‘std::string {aka std::basic_string}’ to type ‘int