-----BEGIN PGP SIGNED MESSAGE-----
can someone help me to solve thise problem:
Imagine I've got this class hierachy:
virtual bool foo( A bar ) = 0;
class B : A
bool foo( B bar )
int main( void )
this won't compile as my class B is still abstract as I didn't provide a
"bool foo( A bar )" member.
But I only want class A to be an interface that tells everybody what to
expect from it's derivated classes. And one of these things is, that
every child must have a member that is called "foo" and has one
parameter of the type of the child itself.
How do I achieve that?
The only workaround I can come up with is, that I have:
friend bool foo( class B, class B );
bool foo( class B bar1, class B bar2 )
I this doesn't guarantee me, that every child of A must have a foo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Flightgear-devel mailing list