Is the variable "protected" derived class likely to be malicious? Should I use "private" in base class variable instead of "protected"?
If you are concerned about 'malicious' modifications, Marking as: will not help.
The C ++ access specifiers are useful only for codes that are essentially playing with the rules.
Marking a member as private
will prevent the general users of your class from messing with them. However, due to non-malicious code the bug may corrupt those members. Given the arithmetical or inappropriate use of the gestures of cost, a C ++ programmer causes these problems.
Comments
Post a Comment