I tried using a boolean expression while writing switch statementsenter image description here. What have I done wrong here and what does this statement - " lvalue required as left operand of asssignment " mean ?
I was expecting both conditions to work i.e
If user types smaller case y or uppercase Y it should not be a problem.
Keep in mind I am just a beginner at C++.
You 2nd condition should be
confirm=='Y'You haveconfirm='Y'and this assignment always evaluates to true. It's a common mistake.