In theortical terms, abstraction is:
- Hiding details from the outer world.
- Providing only essential details to outer world.
C++ provide ways to hide details using access specifiers: public, protected and private.
public access specifier means it is accessible to everyone.
private access specifier means that memebers can only be accessed by other members of the class.
protected is similar to private that is not accessible outside the class but can be accessed by sub classes.
Now most of the people don't understand or have knowledge from whom we are hiding details and how we do it.
We have heard about libraries LIB, DLLs. Libraries are compiled code which can be linked with your applications or programs. Thhat can be created by you or procured from some third party. What generally a library have? It have one heder file which contains interface or functions prototypes and a LIB or DLL. header file is required to tell compiler that used function is defined there at some place. LIB or DLL have the definition or implementation of those functions, which can be linked statically or dynamically.
So basically you have abstracted the implementation detail from other developer or other organization. Access specifier are the means to achieve it.