?? ch11cgolfer.cpp
字號:
//Program 11-8 CGolfer CGolfer is derived from CPerson
// File: Ch11CGolfer.cpp
#include "Ch11CGolfer.h"
#include <iostream>
#include "Ch11CPerson.h"
using namespace std;
/*
CGolfer::CGolfer(string n, int a, int h) //Route 1 this inits all
{
name = n;
age = a;
cout << "\nIn the CGolfer constructor \n";
handicap = h;
}*/
CGolfer::CGolfer(string n, int a, int h) : CPerson(n, a) // Route 2 calls CPerson
{
cout << "\nIn the CGolfer constructor \n";
handicap = h;
}
void CGolfer::WriteGolfer()
{
CPerson::WritePerson();
cout << "\n Handicap: " << handicap;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -