undefined reference to `vtable for Game'

 The problem to this is that, all the virtual for the table should be define. when the pointer reach the vtable, it ll search for all the references for the virtual function in the class. if it couldnot find it then the error "undefined reference to "vtable for Game" is given.

The solution is to implement all the virtual function presented in the class and its sub classes as well.

Stack overflow example.

https://stackoverflow.com/questions/9406580/c-undefined-reference-to-vtable-and-inheritance

Comments

Popular posts from this blog