Hi guys I'm working on a project that uses type char instead of type int to make selections in a menu that calls functions. I'm really hitting a wall with the while loop, I'm pretty sure my syntax is wrong for type char, any help is appreciated!
Lines 30 and 52:
They will always resolve into a true statement. The "=" operator is only used to assign values. To test if two values are equal, use "==". Also, I think you meant to test if MenuOption != '0' on line 52.
Lines 24 and 30:
To test multiple conditions, you have to unfortunately make separate statements. for example: if(x == 'a' || x == 'b' || x == 'c')
"&&" is known as the Boolean AND and "||" is the Boolean OR.
You switch statement starting from line 35:
MenuOption is a char, so the '1', '2', etc. stored in it are not equivalent to 1, 2, etc. Place the single quotation marks in each of your cases to test MenuOption against the correct values.
Edit:
The if condition on line 30 seems unnecessary.