全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Pure virtual function, abstract class?

又称: pure virtual function · abstract class

Definition 3.7 University Computer Science — Year 2 · 第 3 章 — Inheritance and Polymorphism

A virtual function declared with = 0, as virtual double area() const = 0;, is a pure virtual function: it has no version in its class, and every derived class that is to be instantiated must override it. A class with at least one pure virtual function, declared or inherited and not overridden, is an abstract class: no object of it can be created, only objects of derived classes that override every pure function.

在原文中阅读 →