By: nascardriver
The batting average was also initialized. I updated the lesson, thanks!
View ArticleBy: Question on quiz
Can't we define a method for outputting an object in the base class, Fruit, and use that method to output the object of Banana class without having to write a method for it separately?
View ArticleBy: Question on quiz
Can't we define a method for outputting an object in the base class, Fruit, and use that method to output the object of Banana class without having to write a method for it separately?
View ArticleBy: Imayan
Can't we define a method for outputting an object in the base class, Fruit, and use that method to output the object of Banana class without having to write a method for it separately?
View ArticleBy: Question on quiz
Is the following correct too? I wanted both Banana and Apple class to inherent output method from the base, Fruit....
View ArticleBy: nascardriver
You solution doesn't output the apple's fiber content. To do that, you need to overload `operator<<` for `Apple`.
View ArticleBy: Yolo
I have a question regarding the const m_id in "Initializing base class members" paragraph. You write:"However, when the base class constructor finishes, the derived class constructors initialization...
View ArticleBy: nascardriver
That's exactly what the paragraph you took the quote from is saying. It's a hypothetical scenario explaining why the derived constructor cannot initialize members of the base class.
View Article