Encapsulation in C++ and C
https://medium.com/@kateolenya/encapsulation-in-c-and-c-20dca9097e17
DefinitionEncapsulation is a set of tools which can restrict access to data or methods that can manipulate it. Detailed definition of encapsulation can be found in my previous Medium post here. This article is focused on examples of encapsulation in C++ and C programming languages.
By default, data and methods in class are private — visible and modifiable only by object/class. Access level can be set to other values using appropriate key words provided by C++.