I\'m in trouble using std::string::find(). I read strings from console through the following code:
50 while(command.find(exitString) != 0) {
51 std::
You are reading a line and then calling doSwitch() without checking if its exitString. In that case, when the input is exitString, else block at the end of doSwitch() function is executed, causing the program to print "Command Invalido" before exiting the loop.
Is this what you observed?
If its something else, please let us know for what input your code behaves incorrectly and what is the input and output.