yes, they are all implemented ( the animal example was just a similar case to my real implementation )
in my real code, I put "Animal" references to a vector, but the compiler says:
All abstract functions are implemented.Code:c:/djgpp/lang/cxx-v3/bits/stl_vector.h:579: cannot allocate an object of type 'Animal' c:/djgpp/lang/cxx-v3/bits/stl_vector.h:579: since type `Animal' has abstract virtual functions
I can compile whitout any errors the 'Animal' and 'Dog' classes and I can use, for example, the 'Dog' class as such. But
when I use it like:
Code:Animal *animal = new Dog(); animal->doStuff(); -> won`t compile ????




Reply With Quote