pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: inkle c <inkle99@yahoo.com>
To: prlw1@cam.ac.uk
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] libpq++ ---- PgDatabase instance problem
Date: Fri, 20 Aug 1999 06:38:39 -0700 (PDT)
Message-ID: <19990820133839.10526.rocketmail@web504.yahoomail.com> (raw)

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@newn.cam.ac.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




view thread (6+ messages)  latest in thread

Message-ID: <19990820133839.10526.rocketmail@web504.yahoomail.com>
Permalink:  ../19990820133839.10526.rocketmail@web504.yahoomail.com/
Also on:    postgresql.org/message-id/19990820133839.10526.rocketmail@web504.yahoomail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: inkle99@yahoo.com, prlw1@cam.ac.uk
  Subject: Re: [INTERFACES] libpq++ ---- PgDatabase instance problem
  In-Reply-To: <19990820133839.10526.rocketmail@web504.yahoomail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox