On line 10 you've declared pizzaSize as an int, but you're prompting for a character (S, M, or L). So you should define it as charinstead.
When comparing the size on lines 32, 36 and 40, you're actually doing 2 things wrong. First, you're using = instead of == assigns the express on the right to the variable on the left, so, for example, line 32 actually says "assign the value of variable S to pizzaSize. If the value is not zero then execute line 34." You want to compare pizzaSize to the character 'S': if (pizzaSize == 'S')
If you want to compare a char using the letter it must be surrounded with ' '
On lines 35, 39, and 43 you're missing them. For example line 35 would be: if (pizzaSize == 'S')
Keep in mind this only compares to see if pizzaSize is equal to S if you enter s it will not work.
Edit:
I just realized you're wanting to compare your variables you declared at the top with the input pizzaSize.
If you're wanting to use them you're going have to assign a value to each of them. When you assign a char a value you still have to use ' ' Example: char S = 'S'
If you want to use the first method you can get rid of the variables S, M, and L from the top.
If you're going to use the second method you're going have to keep them and assign a value to them.
Lines 11-13: S,M,L are all going to have a value of 1. 'S' || 's' is a boolean expression that evaluates to true (1). Ditto for M and L.
Lines 38,42,46: C++ does not support implied left hand side in conditionals. You must fully specify the conditions.
Example: if (ans == 'Y' || 'y') evaluates as if ((ans == 'Y') || ('y'))
('y') always evaluates to 1 (true), therefore the if statement is always true, regardless of ans.
Edit: Corrected order of evaluation. Thanks dhayden.
if (ans == 'Y' || 'y') evaluates as if (ans == ('Y' || 'y'))
AbstractionAnon, You've had a rare brain hiccup. == has higher precedence than || so it evaluates as if ((ans == 'Y') || 'y') and since 'y' is always true, the whole expression is true.
Actually I agree with AnstractionAnon in the sense that the ifexpression always evaluates to true. My point was that it does so for a different reason.
The if should be if (ans == 'Y' || ans == 'y') Make similar changes to the other if statements.