Quantcast
Channel: Testing multiple boolean values in a single IF statement - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Silverous Black for Testing multiple boolean values in a single IF...

A good solution would be using operands ! and &&! denotes "not" (or in such case "not true") while && combines two different logical comparisons (in such case, "logic test 1" and "logic...

View Article



Answer by Fareanor for Testing multiple boolean values in a single IF statement

A possible fix could be (if I have well understood your problem):if(opt1 && opt2) // opt3, opt4 and opt5 are invalid{ if(!(opt3 || opt4 || opt5)) { // Do something } else { // Display error...

View Article

Testing multiple boolean values in a single IF statement

I a newbie C++ programmer trying to test aruments/parameters passed to a program.Multiple arguments can be passed to the program, however I want to test that if certain arguments are passed then other...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images