I'm a beginner at C++, and I'm having trouble understanding Boolean:
1 2 3
( ! ( true || false) ) //This ends up false
( ! ( true || false && false) ) //This ends up false
( ! ( ( true || false ) && false ) // This ends up true.
Now this confuses me. I understand the precedence of the operators, Boolean not being first, then Boolean and, and lastly Boolean or.
For example, the first one, ( ! ( true || false) ). Wouldn't that end up: ( ! ( !true || !false) ). So wouldn't the !false become true? This is where I'm confused.
true||false will result true then its negated with ! so its false
what you ask is !(!true||!false) it'll become !(false||true) because both value is negated with !