The ability to provide users with a well-defined interface to a set of functions in a way which hides their internal workings. In object-oriented programming, the technique of keeping together data structures and the methods (procedures) which act on them.
In other words, the act of designing and building classes that provide public accessor methods and keeps private what should not be externally accessed means that encapsulation has been accomplished.
This is not specific to C++. It is a concept that goes back to the beginning of object oriented programming.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.