its mean member is duplicated about child, parent class both
but in parent class, the member is list of parent object, and
in child class, the member is list of child's object
it has same meaning about each object's list (instancesArray)
but child class has more member or method, so object lists are different
i think it calls 'hiding'? i guess
just child class hiding parent class's same name member
so i want to use parent class's object list, and childs class list both
is that rule is effectively?? or has some danger whit hiding?
i just ask for question not for tackle :) please teach me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the rule #49 is
duplicated inherited data member
its mean member is duplicated about child, parent class both
but in parent class, the member is list of parent object, and
in child class, the member is list of child's object
it has same meaning about each object's list (instancesArray)
but child class has more member or method, so object lists are different
i think it calls 'hiding'? i guess
just child class hiding parent class's same name member
so i want to use parent class's object list, and childs class list both
is that rule is effectively?? or has some danger whit hiding?
i just ask for question not for tackle :) please teach me
I don't understand. What is "#49" from? Cppcheck does not number the warnings.
It is not a definite bug to hide a member. If you really want to do it.. then it's ok.
The danger is that you will access the wrong member by mistake.