C++面向对象程序设计
1 2 3 4 5 6 7 8 9 11
// Fig. 13.5: fig13_05.cpp basederivedbase// Aiming base-class and derived-class pointers at base-class derived// and derived-class objects, respectively. #include <iostream> using std::cout; using std::endl; using std::fixed;
Outline
fig13_05.cpp
(1 of 5)<iomanip> #include <iomanip>
10 using std::setprecision; 12 // include class definitions 13 #include "CommissionEmployee.h" 14 #include "BasePlusCommissionEmployee.h" 15 16 int main() 17 { 18 19 20 21 22 23 base// create base-class pointer CommissionEmployee *commissionEmployeePtr = 0; base// create base-class object commissionEmployee( CommissionEmployee commissionEmployee( "Sue", "Jones", "222-22-2222", 10000, "Sue", "Jones", "222-22-2222", 10000, .06 );
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库C++面向对象程序设计第七章(16)在线全文阅读。
相关推荐: