Received: from web504.yahoomail.com (web504.mail.yahoo.com [128.11.68.71]) by hub.org (8.9.3/8.9.3) with SMTP id JAA63260 for ; Fri, 20 Aug 1999 09:38:02 -0400 (EDT) (envelope-from inkle99@yahoo.com) Message-ID: <19990820133839.10526.rocketmail@web504.yahoomail.com> Received: from [12.17.193.105] by web504.mail.yahoo.com; Fri, 20 Aug 1999 06:38:39 PDT Date: Fri, 20 Aug 1999 06:38:39 -0700 (PDT) From: inkle c Subject: Re: [INTERFACES] libpq++ ---- PgDatabase instance problem To: prlw1@cam.ac.uk Cc: pgsql-interfaces@postgreSQL.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Well, this is where the problem comes because PgDatabase() is a protected constructor, myclass doesn't inherit from PgDatabase. In simple words: ============================================== class myclass { public: myclass(); private: PgDatabase db; } myclass::myclass():db(NULL){ some-other-stuff-goes-here }; =============================================== the above codes causes me trouble as I described below, any ideas how to fix it? I also tried PgDatabase db as a global variable and init it to be NULL, but this causes the same problem. Thanks. inkle --- Patrick Welche wrote: > inkle c wrote: > > > > Hi, > > > > I am writing a small class which has a PgDatabase > > instance as its private member, and in the > constructor, > > I init it to be NULL (i.e., > > myclass::myclass():PgDatabaseInstanceMember(NULL) > ), this causes a core > > dump, what's wrong with that? > > I'm not too sure what you want, but how about > > myclass::myclass():PgDatabase() > > ? > > Cheers, > > Patrick > __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com