|
Just a general tip for C/C++ coding: ALWAYS initialize your variables!
This includes pointers (init to NULL, or zero), integers, strings, etc.
Also, know your API, whether it's MFC, C runtime, etc. And if you can afford it, use a tool like BoundsChecker from NuMega. It's great for finding memory leaks, buffer overruns, uninitialize variables, ...
|