Christian Mayer wrote:
> 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?

With a template.  But IMHO you really don't want to go there. :)

Basically, you make a class template with a function parametrized
on the type of the class.  The problem is that this kind of
template wizardry is confusing and hard.  You had to ask how to
do it, which means that most people who see it are going to have
to look it up before understanding it.


Flightgear-devel mailing list

Reply via email to