by chandlerc · 15y ago · 0 comments
int foo = 0;
But got changed into a non-integral type: Thing foo = 0;
Turns out Thing had a copy constructor roughly like: Thing::Thing(Thing* old)
: field(old->field)
{
}
Needless to say, my program was not very happy. int i = NULL;
Because of C++'s conflation of NULL and 0 (and now C++0x's nullptr).