Does anyone have suggestions for a good way to find out what (local) pointers are pointing at what items on the heap?
I have a bug in a program that's almost certainly caused by two pointers pointing to the same object when they should be pointing to separate ones.
Treat this as a 'newbie' question. The answer might be a debugger, but I haven't had a bug serious enough to use a debugger in four years - one of the benefits of using c++ - so I've forgotten how to use one. I
usually just print variables to stdandard output. In addition to Salman's excellent response, you might also want to look at Valgrind. But, DDD can give you a very graphical description of your pointers and objects. With GDB and DDD you should be able to isolate when the
On Sun, 01 Jun 2003 17:57:50 +0100
John Lamb