Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - In C++, the ~ sign before the variable is used to invert the internal bits of bytes, words and doublewords.
In C++, the ~ sign before the variable is used to invert the internal bits of bytes, words and doublewords.
That depends on what you mean by "anti". If it is "bitwise inversion", it is of course ~, if it is logical inversion, it is naturally! . Bool has two values: 1 and 0, true and false. The bitwise negation of bool value 1 or true is -2 instead of 0, which means that the bitwise negation of false is-1 instead of 1. Only logical negation is 1