Hi,
I just came across a faulty code of mine when working on Symbian C++ code. It threw an exception for the code fragment below (or something similar to this):
So, I tried the same on Visual C++ and gcc compiler. The funny thing is, I do not get an exception when I run the code. An exception is thrown only in debug mode.
Can someone tell me what is happening here?
I just came across a faulty code of mine when working on Symbian C++ code. It threw an exception for the code fragment below (or something similar to this):
Code:
int x; for(int i = 2; i >= 0 ; i--) { x = 5 % i; // [B]Divide by zero exception here when i = 0.[/B] x++; }
Can someone tell me what is happening here?
Comment