Simulating interfaces when unsupported by a language

52 Views Asked by At

Is there a way to form pseudo interfaces when these aren't directly supported by an OOP language?

1

There are 1 best solutions below

3
On

Does it have virtual functions? An interface is nothing more than a base class with nothing but virtual functions, either without any body, or with a stub that throws an error if the base class version is used.