nathan
Sun Dec 09 15:08:53 PST 2007
In article <d267f5ad-8ece-4b0b-b328-e9608efa61f4@t1g2000pra.googlegroups.com>,
<n.torrey.pines@gmail.com> wrote:
>If the debugger could detect access to uninitialized values, this
>time-consuming process of inserting print statements could have
>been avoided. I wonder if there are other C++ compilers that can do
>that, but AFAIK VC++ is actually the best one for debugging, sadly.
DevStudio 2005 can detect use of uninitialized *local* variables.
Can't do it with allocated memory. If you want to detect such errors
in allocated memory, you'll need a 3rd party app like Boundschecker
(see
http://www.compuware.com/products/devpartner/visualc.htm ), or
Valgrind (Linux only, see
http://valgrind.org/ ). Boundschecker is
fairly pricey, and last time I used it (some years ago), it slowed
program execution down to a crawl. Maybe it's improved in the past few
years on either/both fronts.
Nathan Mates
--
<*> Nathan Mates - personal webpage
http://www.visi.com/~nathan/
# Programmer at Pandemic Studios --
http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein