The concept of representing important details and hiding away the implementation details is called data abstraction. This programming technique separates the interface and implementation. Data abstraction is also an OOP feature.
Abstraction tries to minimize details so that the programmer can focus on a few concepts at a time. Abstraction is the basis for software development.
Classes use the concept of abstraction.
#include <iostream>
using namespace std;
int main()
{
cout<<"Data Abstraction Example"<<endl;
return 0;
}
In c++, cout displays the specified text on the console but we don’t need to understand how cout displays it. It’s implementation code is written somewhere in the header file iostream. We only have to care about the interface and not the underlying implementation and thus abstraction makes our programming task easy.