Click here to Skip to main content
16,010,512 members

Comments by Member 11841297 (Top 2 by date)

Member 11841297 16-Jul-15 7:18am View    
Sorry but your virtual void showname() in base class i.e Animals is doing nothing. And why you wrote like this Dog(string breed):breed(breed){} for every class?
Sorry once again my question is first of all to is how we use class * in our list as datattype for eg.
std:: list<animals *=""> animal instead of std:: list<animals> animal. Whats this * is doing.
And second how can we show the complete list through iterator?
Member 11841297 16-Jul-15 6:47am View    
you are declaring getName fucntion in class dog instead of doing it in Base class. And then how would I define it in main class.?
and do I need to declare the function in a1l classes?.