Where did the concept of Interfaces come from?

后端 未结 18 2107
有刺的猬
有刺的猬 2021-01-11 18:45

In c#, we have interfaces. Where did these come from? They didn\'t exist in c++.

18条回答
  •  说谎
    说谎 (楼主)
    2021-01-11 19:13

    They existed in C++, but they were known as virtual base classes, which consisted only of pure virtual functions. This is where the "I-" prefix for interfaces came from -- to differentiate between virtual base classes from abstract base classes.

提交回复
热议问题