undefined reference to vtable
Jonathan Wakely
jwakely.gcc@gmail.com
Sat Jul 16 18:23:00 GMT 2011
On 16 July 2011 19:20, Kalle Olavi Niemitalo wrote:
> eric <cneric12lin0@gmail.com> writes:
>
>> actually that book even did not specially define Superhero::walk(),
>> that is I add by myself to escape my compile's error
>> (is that right? or book's is right?)
>
> I see you did not define Superhero::eat(), however. You must
> define all the virtual functions of class Superhero, even if the
> program never calls them. http://gcc.gnu.org/faq.html#vtables
http://gcc.gnu.org/ml/gcc-help/2011-07/msg00143.html
More information about the Gcc-help
mailing list