problem with virtual functions
vok@cfar.umd.edu
vok@cfar.umd.edu
Thu May 17 15:08:00 GMT 2001
Here is the class definition:
#ifdef __GNUG__
#pragma interface
#endif
class StateFile;
class Interface;
class ostream;
class GTracker {
public:
ÃÂ GTracker();
ÃÂ virtual ~GTracker() ;
ÃÂ virtual void set_state(StateFile& statefile, Interface *interface)
;
ÃÂ virtual void write_state(ostream& s) ;
ÃÂ virtual void set_defaults() ;
ÃÂ virtual void reset() ;
ÃÂ virtual void step_once(int field, int nfields) ;
ÃÂ virtual void display() ;
};
I use this class as pure virtual.
Still, I have defined function bodies for each function in a seperate
cc-file.
The constructor and destructor bodies are both empty,ÃÂ the other
functions cout the string "not implemented".
ÃÂ
Alexandre Oliva wrote:
On May 17, 2001, vok@cfar.umd.edu wrote:
> Wouldn't the compiler refer explicitely to the undefined method, if
something
> like that happens?
It would refer to it in the virtual table, but the virtual table
didn't get defined because of that.
Care to post the definition of class GTracker?
--
Alexandre OlivaÃÂ ÃÂ Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC DeveloperÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-UnicampÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software EvangelistÃÂ ÃÂ ÃÂ *Please* write to mailing
lists, not to me
--ÃÂ
Volker Krügerààààààààààààà|\ |\ |\ààCenter For Automation Research, Rm# 4465
University of MarylandÃÂ ÃÂ ÃÂ ÃÂ | \| \| \ÃÂ ÃÂ phone: +1 (301) 405-1756ÃÂ fax: 314-9115
A. V. Williams BuildingÃÂ ÃÂ ÃÂ |ÃÂ |ÃÂ |ÃÂ \ÃÂ ÃÂ url:ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ http://www.cfar.umd.edu/~vok
College Park, MD 20742ÃÂ ÃÂ ÃÂ ÃÂ |__|__|___\ÃÂ ÃÂ email:ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ vok@cfar.umd.eduÃÂ
******************ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ PGP key availableÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ************************
ÃÂ
More information about the Gcc
mailing list