Re: About pure virtual function

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks.

I've learned all of the answers, I think maybe I misunderstand the concept
of pure virtual function and abstract class when some classed inheritate
from it. What I understand is: If a new class(common class, not abstract one)
inheritates from an abstract class, it must define all of the pure virtual
functions, if not, then this new class has an error and we can justify this
error not until we define an object of this new class.

And what I can get the view of c++ compiler is : if a new class inheritates
from an abstract class, new class doesn't need to define all of the pure
virtual functions, that's no problem, but you can't define an object of this
new class, if you define one, you are wrong.
Is that right?

.



Relevant Pages

  • Re: About pure virtual function
    ... classed inheritate from it. ... class, it must define all of the pure virtual functions, if not, then ... But you derived a new abstract class, not concrete (which you called "common ... inheritates from an abstract class, new class doesn't need to define ...
    (microsoft.public.vc.language)
  • Is this a abstract classe
    ... It contains declaration of 5 ... Or a abstract class always contains a virtual function. ... A class containing the pure virtual function is always a abstract ...
    (comp.lang.c)
  • Using reflection to get the class name from a virtual method in an abstract class
    ... I have an abstract class, call it A, with a virtual function from which ... virtual property). ...
    (microsoft.public.dotnet.framework)