Suppose I have a class, Animal, that contains the virtual method eat(). Now suppose Dog is derived from Animal, and also implements eat().
Now somewhere else, I have a class Barn with a feed method that takes Animal& as a parameter. How can I force class Barn to call Dog's eat, when a Dog is passed to feed?
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
fluidDelusions 0 Newbie Poster
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
fluidDelusions 0 Newbie Poster
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
fluidDelusions 0 Newbie Poster
winbatch 7 Posting Pro in Training
NosKills 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.