Can I do this in C++?
if (4<5<6) cout<<\"valid\"<
i.e a double comparison? Since I know that I can
boo
It compiles but won't do what you expect -
if( 4 < 5 < 2)
same as
if( (4 < 5) < 2)
if( (1 < 2) ) //1 obtained from cast to boolean
which is of course true, even though I imagine you were expecting something quite different.