your best way to do it would be
(!b1 ^ !b2)
where b1 and b2 are expressions.
That is, assuming that ! will return the same boolean type for both.
int a=1;
int b=2;
assert (! ( !a ^ !b ));
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 15 of 22
Thread: Logical XOR in C/C++?Threaded View
|
Click Here to Expand Forum to Full Width |