#include"iostream"
站在用戶的角度思考問(wèn)題,與客戶深入溝通,找到臨泉網(wǎng)站設(shè)計(jì)與臨泉網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名申請(qǐng)、網(wǎng)站空間、企業(yè)郵箱。業(yè)務(wù)覆蓋臨泉地區(qū)。
using namespace std;
class base1{
public:
base1(){
cout << "父類構(gòu)造函數(shù)" << endl;
}
~base1(){
cout << "父類的析構(gòu)函數(shù)" << endl;
}
virtual void print(){
cout << "virtual base1.print();" << endl;
}
};
class derived1 :public base1{
int b;
public:
derived1(){
cout << "子類構(gòu)造函數(shù)" << endl;
}
~derived1(){
cout << "子類的析構(gòu)函數(shù)" << endl;
}
virtual void print(int a = 0){
cout << "virtual derived.print();" << endl;
}
};
void f(){
base1 *d=new derived1;
delete d;
}
int main(){
f();
system("pause");
return 0;
}