Quote Originally Posted by incubator
I dont understand how that code evne compiles, since when is
Qt Code:
  1. if (condition1 and condition2) {}
To copy to clipboard, switch view to plain text mode 

valid C++ ?

I thought it should be
Qt Code:
  1. if (condition1 && condition2) {}
To copy to clipboard, switch view to plain text mode 
'and', 'or' and 'xor' are all valid C++. I was suprised when I found out about it too! (it's in the back of The C++ Programming Language by Bjarne Stroustroup). They were added to the language to get around the fact that in some regions of the world, the characters '&', '|' and '^' are not available on the keyboard layout.

It's probably nice for ex-Pascal programmers too!