I am a little excited about this problem - in debug mode this problem does not occur at all, but in release mode it seems that I can hardly do anything to fix it.
Here is a screenshot of what is happening inside VS2013:

I initialize nResultto 1L, and the internal value is shown as 3422785012. In debug mode, this value is really 1L.
Any ideas as to why the displayed value is not close to the initial value set for nResult? I tried playing with the compiler settings - in debug mode this code works fine.
source
share