Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2004 22:09:40 +0200
From:      Dimitry Andric <dimitry@andric.com>
To:        "Ryan Sommers" <ryans@gamersimpact.com>
Cc:        hackers@freebsd.org
Subject:   Re: Question for C++ Experts
Message-ID:  <629886387.20040726220940@andric.com>
In-Reply-To: <49805.208.4.77.15.1090871732.squirrel@www2.neuroflux.com>
References:  <49805.208.4.77.15.1090871732.squirrel@www2.neuroflux.com>

next in thread | previous in thread | raw e-mail | index | archive | help
------------97961962E89D4F9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

On 2004-07-26 at 21:55:32 Ryan Sommers wrote:

> The problem I am running into is that it seems to be illegal to call
> a pure virtual function from an abstract base contructor.

This is because you shouldn't call virtual functions from
constructors, unless you know what you're doing. :)

Try using exceptions, or two-phase initialization.  And read a C++ FAQ
for more info, i.e.:

http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.3

There's lots more in there, also explaining your other questions. But
this is quite offtopic for this list...

------------97961962E89D4F9
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFBBWUEsF6jCi4glqMRAqZlAJ9emlYkrvEJankx+S1oeDBXZw6AGQCgkIZp
1T+UUzOZh88yydFtKBjfbYg=
=FoFn
-----END PGP MESSAGE-----

------------97961962E89D4F9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?629886387.20040726220940>