   Exceptions :-/
  Is there any way to find out *where* an exception happens? I mean stuff like this:First-chance exception at 0x00e80ea6 in WTech_2010.exe: 0xC0000005: Access violation reading location 0x00000000.Unhandled exception at 0x00e80ea6 in WTech_2010.exe: 0xC0000005: Access violation reading location 0x00000000.I don't want to step through my whole code, just to find where that happens. This is so annoying!   
  Compile in debug mode and start it with the debugger attached to it. After the program exits have a look at the backtrace.   ;  What is that backtrace?   ;  Its a list of the calls that have recently been made. It is also sometimes called 'call stack'. Have a look at the documentation of your IDE.   ;  Well, your debugger should be able to give you a stack trace - something like (VS2010)foo.exe!broken_function() Line 23foo.exe!main() Line 79foo.exe!__tmainCRTStartup() Line 555 + 0x17 byteskernel32.dll!75d0d0e9()[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]ntldll.dll!771519bb()...this is the call stack state when the exception was thrown - meaning __tmainCRTStartup() was called, and at line 555 it called main() which at line 79 called broken_function(), and we were at line 23 when the exception was thrownUsing VS2010, getting a stack trace is easy - run in debug mode, when the box pops up telling you that a first-chance exception has occurred choose break, and then Debug->Windows->Call Stack   ;  Okay, I know the CallStack, and I know how to use it. But some exceptions never force the debugger to stop! They just exit out of the current function. And they just appear in the debug output. Never had this??   ;  Assuming you're using visual studio: Go to Debug => Exceptions and simply enable all C++ exceptions, as well the Win32 exceptions that are thrown (in your case, access violation). The debugger should halt from now on :)   ;  There are no exceptions in the debug menu or debug options of VC++ 2010 :(   ;  Do you have a project open? That menu item won't show up unless one is. It's also Ctrl-Alt-E if you still can't find it.   ;  Ah, many thanks SiCrane!   