There are a few things i don't understand
Can someone help me.
I Want to know what this line of code doing - Mammal():itsAge(2), itsWeight(5){}
I know Mammal is a construtor and want it does the next bit is fuzzy :itsAge(2), itsWeight(5){}
I know what the : derived means but not what this code is doing at the end
I mean this code :itsAge(2), itsWeight // not the full code down there
Question 1: Mammal():itsAge(2), itsWeight(5){}
That is an initializer list, when calling the 'Mammal' constructor the member 'itsAge' is initialized with value '2' and 'itsWeight' with '5' as value.