Possible Duplicate:
C++ Accesses an Array out of bounds gives no error, why?
I have a recurring problem with array using Qt creator on Windows. When my program tries to access a memory cell that doesn't exist there are randomiz crashes so it is very difficult to debug.
Is there any library or option to check in order to stop the program when my program accesses a non existing memory cell?
Example:
int * toto = new int [4];
toto[6] =2;
Leads to mentioned random behavior.
I'm on Windows 7 using Qt creator 4.8.1.