0
Constructor initialiser list
For a class ''P'', with one constant member named ''weight'' of type ''double'', fill in the blanks to initialize ''weight'' in the constructor initializer list. P::P(double w) (w) { }
5 Respostas
+ 2
P::P(double w) :
weight
(w)
{
}
+ 1
Is there anything you're having trouble with in the assignment you posted so we can help you out?
+ 1
P::P(double w) :
weight (w)
{
}
+ 1
P::P(double w)
:
weight
(w)
{
}
+ 1
P::P(double w)
:
weight
(w)
{
}