WHAT ARE INTERFACES?
- An interface is a group of related functionalities that can belong to any class. The interfaces are created using abstract class.
- Abstract classes are used to achieve the abstraction in C++ and abstraction in C++ is a process to hide the internal details and show functionality only.
- The class can be made abstract by declaring at least one of its functions as pure virtual function. A pure virtual function is implemented with a virtual keyword and has =0 in its declaration and this function is called as abstract function as it has no body.
LET US HAVE A LOOK AT THE SYNTAX:
virtual void function() = 0;