Discussion: Lesson 3 - A RollingDie in C++ and Constructors
BackComments
3 messages from 3 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Comments
Hi Lucian, this text is correct and refers to this piece of code:
RollingDie::RollingDie() : RollingDie(6)
The general constructor with more params RollingDie(6)
is called
by the specific constructor RollingDie()
. In this case, it might be
confusing that the specific constructor has less parameters than the general one
but it can happen. If you follow the course, there are many other samples of
constructor calls.
Thanks for your reply David!
I'll give it more looks to understand better!
3 messages from 3 displayed.