Re: [gtkmm] Compiling my first gtkmm program - HELP!!
- From: nick <nick anvil com>
- To: Matthew Walton <matthew alledora co uk>
- Cc: Maya <EscalanteCanada netscape net>, gtkmm mailing list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Compiling my first gtkmm program - HELP!!
- Date: Fri, 23 Apr 2004 15:30:53 +0100
It's off topic but the virtual inheritance keyword is explained in
page 401 of the C++ Programming Language Special Edition.
To quickly summarize it's a (badly named) method of dealing with
the diamond inheritance problem where a class is derived from two
classes that each had a common super class.
It helps avoid the problem of having two copies of the same class
members occurring in the sub class.
It's often used in job interviews to test knowledge of the language
since many people have never seen it in.
It's definitely valid ISO C++.
Nick
On Fri, 2004-04-23 at 15:01, Matthew Walton wrote:
> Well I don't think it's the Makefile this time. I'd like to know what
> this is doing here:
>
> > class Wimm : virtual public Gtk::Window {
>
> I didn't even know you could do virtual inheritance, and I certainly
> have no idea what it means. Since the errors look like they might be
> related to virtual function tables and they're certainly something to do
> with something down in the Gtk::Window ancestor classes, perhaps you
> could try
>
> class Wimm : public Gtk::Window {
>
> instead and see what happens. Unless there's a particular reason you
> need to do it, in which case someone more knowledgeable than I will have
> to take over, or I'll have to go and read about it, because I've never
> heard of virtual inheritance in C++. But I guess it must exist in some
> form or it wouldn't compile (or is that me putting too much faith in g++?)
>
> Anyway, that's all I can offer this time... glad my other tip helped. I
> honestly didn't notice these error messages really last time, as they
> were a bit buried amidst the others.
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]