A user cannot directly refer to a private member
- 9. Technicalities: Classes, etc.
- from Programming: Principles and Practice Using C++, Second Edition
- Publisher: Addison-Wesley Professional
- Released: May 2014
Have to double check this interpretation but... Class definitions have interface and implementation thus a class is in a round about way similar to a function with scoping rules. Public scope is just that and provides what a pointer within a function would provide, that a variable within is accessible from the outside through a reference.
Private members are local to the class and therefore can only be accessed from within that scope.
Code becomes secure from malicious injection if data is not directly available from the outside.
Share this highlighthttp://www.safaribooksonline.com/a/programming-principles-and/44305/