intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Inheritance, Virtual Functions, and Polymorphism

Chia sẻ: Chankinh1 Chankinh1 | Ngày: | Loại File: PDF | Số trang:41

136
lượt xem
10
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

This module discusses three features of C++ that directly relate to object-oriented programming: inheritance, virtual functions, and polymorphism. Inheritance is the feature that allows one class to inherit the characteristics of another. Using inheritance, you can create a general class that defines traits common to a set of related items. This class can then be inherited by other, more specific classes, each adding those things that are unique to it. Built on the foundation of inheritance is the virtual function. The virtual function supports polymorphism, the “one interface, multiple methods” philosophy of object-oriented programming. ...

Chủ đề:
Lưu

Nội dung Text: Inheritance, Virtual Functions, and Polymorphism

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2