Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
divide or mod by zero
A constant expression has a zero denominator. To resolve the error, do not divide by zero.
The following sample generates C2124:
// C2124.cpp
int main() {
int i = 1 / 0; // C2124 do not divide by zero
int i2 = 12 / 2; // OK
}