operator<<
John Cormie's Radio Weblog

 






Subscribe to "operator<<" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 

 

  Tuesday, August 12, 2003


Programming quiz #2 What's wrong with this constructor?

class Buggy : public Base
{
private:
Object mymember;
public:
Buggy() : Base(&mymember)
{
}
};

Today, a change I made to a base class constructor exposed a bug like this in a derived class. Why is the above constructor just begging for a SIGSEGV?
11:27:49 PM     comment []


Click here to visit the Radio UserLand website. © Copyright 2004 John Cormie.
Last update: 3/21/2004; 10:29:42 AM.

August 2003
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Jul   Sep