On 16 July 2011 19:20, Kalle Olavi Niemitalo wrote: > eric <cneric12lin0@xxxxxxxxx> 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