Also, the reason you're getting the "warning" is because you aren't using break's after the case.
If your switch gets the asterisk (*), it'll execute that function, then the function below it, and the one below that, etc.

By putting a break after multiplication(firstNumber,secondNumber); like so:multiplication(firstNumber,secondNumber); break; it'll execute only that one argument, and then exit the switch statement.

Re: Switch statement problem

Posted 25 January 2009 - 06:50 PM

Quote

Also, the reason you're getting the "warning" is because you aren't using break's after the case.
If your switch gets the asterisk (*), it'll execute that function, then the function below it, and the one below that, etc.

By putting a break after multiplication(firstNumber,secondNumber); like so:
multiplication(firstNumber,secondNumber); break; it'll execute only that one argument, and then exit the switch statement.

Also when I started C++ and started my calculator I used YouTube (Visual Learning) here is a link if you want it. It shows a slightly diffrent way to program it then the way you have. Click here