From: | inkle c <inkle99(at)yahoo(dot)com> |
---|---|
To: | prlw1(at)cam(dot)ac(dot)uk |
Cc: | pgsql-interfaces(at)postgreSQL(dot)org |
Subject: | Re: [INTERFACES] libpq++ ---- PgDatabase instance problem |
Date: | 1999-08-20 13:38:39 |
Message-ID: | 19990820133839.10526.rocketmail@web504.yahoomail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
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 <prlw1(at)newn(dot)cam(dot)ac(dot)uk> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Patrick Welche | 1999-08-20 14:04:13 | Re: [INTERFACES] libpq++ ---- PgDatabase instance problem |
Previous Message | Manjinder Singh | 1999-08-20 13:13:18 | subscribe |