नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'~' : zero extending 'type1' to 'type2' of greater size
Remarks
The result of the ~ (bitwise complement) operator is unsigned and then zero-extended when it is converted to a larger type.
Example
In the following example, ~(a - 1) is evaluated as a 32-bit unsigned long expression and then converted to 64 bits by zero extension. This could lead to unexpected operation results.
// C4319.cpp
// compile with: cl /W4 C4319.cpp
int main() {
unsigned long a = 0;
unsigned long long q = 42;
q = q & ~(a - 1); // C4319 expected
}