How does the "Or" operator work? (In C++) : <pre><code>#include "stdafx.h"
#include &lt;iostream&gt;

int x = 0;

int main(){
std::cin &gt;&gt; x;
if (x == 5 || 6) {
std::cout &lt;&lt; "5 or 6\n";
}
else {
std::cout &lt;&lt; "Not 5 or 6\n";
}
    return 0; 
}
</code></pre>

<p>This simple code only returns "5 or 6" to the console, no matter what number you put in it.  I really don't understand why. If || is the or operator, then it should work. If x is 5 or 6 it should display "5 or 6". If it's not, display "Not 5 or 6". Could someone please explain?</p>
