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++; }
Leave a comment: