Domanda di colloquio di Amino

Does C++ Have Interfaces?

Risposta di colloquio

Anonimo

15 nov 2015

C++ does not understand the concept of interfaces. However, since an interface is a "contract" that an object must adhere too, it is possible to create an interface by defining a class without member variables and with member functions defined as pure virtual.