Re: Odd error with g++
On Saturday 21 Jan 2006 03:56 in article
<1137815810.067010.214930@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> of
comp.os.linux.development.apps, elitecodex wrote:
[snip]
> What is a vtable? What does this mean?
It holds pointers to virtual methods for each class in an inheritance
hierarchy.
> Basically, I have a object JobFile and a object JobFileReader that
> inherits it. I am trying to instaniate a JobFileReader class for
> testing.
Did you declare a method virtual in the descendant class but not declare
it virtual in the parent class?
--
Regards
Dave [RLU#314465]
======================================================
dwnoon@xxxxxxxxxxxxxxxxxxxxx (David W Noon)
Remove spam trap to reply via e-mail.
======================================================
.
Relevant Pages
- Re: desgin tables into objects or vice versa?
... > to design a class tree according to it? ... virtual methods are probably good. ... If the processing is the same apart from some extra fields the probably best ... different and inheritance and polymorphism would be good. ... (microsoft.public.dotnet.languages.csharp) - Re: Inheritance question
... I guess I did need to be a lot clearer on intent. ... I am trying to learn inheritance so i dont really know the questions to ask. ... public BaseClass() ... virtual methods to deal with per-type behaviors. ... (microsoft.public.dotnet.languages.csharp) - Re: error CS0621: virtual or abstract members cannot be private
... The OOP languages that are in the mainstream all encourage inheritance. ... They can't override your private virtual method, but you've still got a public method they are going to _want_ to override and instead are going to wind up hiding (which whatever you think about public virtual methods seems to me to be much worse). ... If you want to hide _all_ of the implementation, better to make the base class private to your factory as well, the virtual method protected, and expose the API as an interface. ... (microsoft.public.dotnet.languages.csharp) - Re: error CS0621: virtual or abstract members cannot be private
... The OOP languages that are in the mainstream all encourage inheritance. ... But I feel that most of the virtual methods in the .NET framework are not public but protected ... I could make the Base class constructor private so the nested classes can still derive from it but nobody else. ... (microsoft.public.dotnet.languages.csharp) - Re: Pointer to virtual object on stack
... It is a very simple case of inheritance and dynamic binding. ... derived from clas A, which means that B 'isa' A, anytime an instance of ... > virtual methods then B's virtual methods. ... (comp.lang.cpp) |
|