G
Guest
I don't understand. What's the difference in practice between 2 next lines?
When I *must* use first line and when second?
When I *must* use first line and when second?
I don't understand. What's the difference in practice between 2 next lines?
When I *must* use first line and when second?
I don't understand. What's the difference in practice between 2 next lines?
When I *must* use first line and when second?
Siana said:The first line declares a function a in some class that has no
definition
- it is there only to be overridden by derived classes for
the purposes of polymorphism. It also makes the class abstract (unable
to be instantiated). Derived classes must declare and implement this
function or else they too are abstract and un-instatiable. It is
useful in defining an interface.
Siana said:The first line declares a function a in some class that has no
definition
- it is there only to be overridden by derived classes for
the purposes of polymorphism.
The second line declares a function a in some class that must have an
implementation for that class. That implementation will be inherited
by derived classes but can still be overridden and perform
polymorphically.
I don't understand. What's the difference in practice between 2 next lines?
When I *must* use first line and when second?
Thomas Wintschel said:The first one would be used when defining a pure virtual base class.
Now you're being pedanticjeffc said:You mean an abstract class.
Ron Natalie said:Now you're being pedantic
jeffc said:I knew somone was going to say that
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.