Thursday, July 07, 2005

Locating bugs in my code

I was moving a chunk of code from CodeWarrior to Xcode, and Xcode decided that it didn't like some of the C++ that I had written. CodeWarrior had been happy with the code for a while. I looked at the code, and asked some friends, and puzzled over the (confusing) gcc error messages, and ?

Xcode was right.
My code (and CodeWarrior) were incorrect.

[ The problem was that I was passing a temporary object as a non-const reference; something that the standard does not allow. ]