Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>~ bitwise not operator (unary)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ~                       Bitwise NOT Operator (unary)

 ~exp                    bitwise NOT
 exp                     any integral type (int, char, enum, etc.)

    The unary operator ~ performs a bit-by-bit complement on exp,
    converting each 0 bit to a 1 and each 1 bit to a 0.  The result is of
    the same type as exp.  For example:

           j = 0x0F71;
           i = ~j;              /* i == 0xF08E */

    You also use ~ in the declaration of destructor functions.


See Also: ! & ^^ |

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson