Archive for the 'C++' Category

The dangers of Macros

Another developer came to me with a problem today that he couldn’t figure out. He couldn’t believe what he was seeing in the debugger and needed a second set of eyes. He had a line of code like the following; return max( eRetVal, GetNumber() ); While debugging, he noticed that he was stepping into the [...]

Debugging C++ Method Parameters

New Rule: Make sure your parameter names are consistent between your declarations and definitions in C++. Here is why… I was trying to debug some C++/CLR code today when I ran into an interesting behavior (bug?) in Visual Studio 2005. I had a breakpoint in the first line of my method which I hit fine. [...]