Thread: C++ Code Error?
View Single Post
  #10   Spotlight this post!  
Unread 20-01-2003, 13:24
jeremy562 jeremy562 is offline
Engineer
#0562 (SPARK 562)
 
Join Date: Feb 2002
Location: Fitchburg, MA
Posts: 74
jeremy562 is an unknown quantity at this point
Send a message via AIM to jeremy562
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, ...