This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does "pure virtual method called" error mean?


On Jan 23, 2002, Abizar <Abizar@stts.com.sg> wrote:

> During run-time, my program terminates and the message "pure virtual method
> called" is shown.
> The program was compiled using GCC3.0.3. I would like to know what are its
> possible causes.

In general, it means you've called a method that is declared pure
virtual (i.e., virtual with a = 0 ``initializer'').  Such a method can
only be called if you call it from within a constructor or a
destructor of a base class or if you explicitly tell the compiler to
call a base class method using the baseclass::method() notation.

-- 
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]