Article View: gnu.gcc.help
Article #41790virtual tables undefined ---what does that mean?
From: JC Magras
Date: Mon, 19 Feb 1996 00:00
Date: Mon, 19 Feb 1996 00:00
79 lines
3031 bytes
3031 bytes
I am using g++ 2.7.2 and libg++ 2.7.1 on a Solaris 2.4/Sparcstation V
machine.
I have given the class declarations below...
but g++ emits this... (nm -C says the _vt labels are virtual tables)
_vt.13GameContainer GameContainer.o
_._10GameBottle room.o (note: this contains main)
_vt.10GameBottle GameContainer.o
What causes this? How can it be fixed?
Thanks in advance,
J.C. Magras
class GameContainer:public GameObject {
GameContainer &operator = (const GameContainer &) {
return (*this);
};
protected:
unsigned short item_count;
//GameControl *dials;
public:
GameObject **contents;
//const string &get_contents(const GameContainer &jug) const;
virtual unsigned short get_percentage_full(void);
GameContainer(void) ;
GameContainer(const estring ObjectName);
GameContainer (const GameObject &old_game_object) ;
GameContainer(const string &ObjectName , unsigned long int
ObjectFlags[]);
virtual ~GameContainer(void);
friend ostream &operator << ( ostream &out_file,
const GameContainer &game_piece);
};
class GameBottle:public GameContainer {
GameBottle &operator = (const GameBottle &) { return (*this); };
protected:
// GameObject **contents;
signed long int max_capacity;
signed long int current_load;
const estring units("milliliters");
//GameControl *dials;
public:
//GameObject **contents;
//const string &get_contents(const GameBottle &jug) ;
unsigned short get_percentage_full(void);
GameBottle(); // { max_capacity = 2000; current_load=0; item_count=0;};
GameBottle( const estring what,
unsigned long int flags[],
signed long inital_load,
unsigned long max_cap=1000);
GameBottle( const GameObject &what,
signed long inital_load,
unsigned long max_cap=1000 );
virtual ~GameBottle() { if (contents[0]) {
delete contents[0];
}
item_count=0;
};
friend GameBottle &operator += (GameBottle &game_piece,
const GameBottle &resupply);
friend GameBottle &operator -= (GameBottle &game_piece,
const GameBottle &withdrawl);
friend ostream &operator << (ostream &out_file,
const GameBottle &game_piece);
};
#endif
Technical Details
Message-ID:
<4gag9r$j8h@news.onramp.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,216224e8491a5628,start X-Google-Attributes: gid11318c,public From: magras@suite.com (JC Magras) Subject: virtual tables undefined ---what does that mean? Date: 1996/02/19 Message-ID: <4gag9r$j8h@news.onramp.net> X-Deja-AN: 140119734 organization: On-Ramp; Individual Internet Connections; Dallas/Ft Worth/Houston, TX USA newsgroups: gnu.gcc.help