C++ Syntax: Not: ! ~
! is the unary logical not: any non-zero value (true) becomes 0 (false),
while 0 becomes 1.
~ is the bitwise not or one's complement: the setting of every bit in the
value is inverted.
Other Uses for ! ~
Go Back to the
The C++ Crib Top Page
If you have any comments about this page please send them to