, 2 min read
Operators and, or and xor written in English: is this standard C++?
3 thoughts on “Operators and, or and xor written in English: is this standard C++?”
, 2 min read
3 thoughts on “Operators and, or and xor written in English: is this standard C++?”
Even if valid, that’s so awful methinks, besides: which operation do you mean? bitwise? logical?
These are standard in C++. If Visual C++ doesn’t accept them, it’s broken. “and” means &&, while & would be “bitand”.
You should be able to use the following operators (logical then bitwise)…
and = &&, &
or = ||, |
xor = ^
…without having to include “iso646.h”. This syntax has always been part of ANSI C right from the outset; it also makes no difference which version of VC++ you are using.
Just ensure that you start a command-line project, as opposed to a Windows-based project, in VC++. This should include the basic headers for you, and won’t bloat your code.
Hope this helps.