国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

cpp13.2

2019-11-10 18:15:00
字體:
來源:轉載
供稿:網友

tabtenn0.h

#PRagma once#include<string>using std::string;class TableTennisPlayer{private:	string firstname;	string lastname;	bool hasTable;public:	TableTennisPlayer(const string & fn = "none",		const string & in = "none", bool ht = false);	void Name() const;	bool HasTable() const { return hasTable; };	void ResetTable(bool v) { hasTable = v; };};

tabtenn0.cpp

#include<iostream>#include"tabtenn0.h"TableTennisPlayer::TableTennisPlayer(const string & fn,	const string & ln, bool ht): firstname(fn),	lastname(ln), hasTable(ht){}void TableTennisPlayer::Name() const{	std::cout << lastname << ", " << firstname;}

usett0.cpp

#include<iostream>#include"tabtenn0.h"int main(){	using std::cout;	TableTennisPlayer player1("chuck", "Blizzard", true);	TableTennisPlayer player2("Tara", "Boomdea", false);	player1.Name();	if (player1.HasTable())		cout << ": has a table./n";	else		cout << ": hasn't a table./n";	player2.Name();	if (player2.HasTable())		cout << ": has a table./n";	else		cout << ": hasn't a table./n";	system("pause");	return 0;}


上一篇:傳紙條

下一篇:格里高歷日歷判斷閏年

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 朝阳市| 炎陵县| 长宁区| 家居| 杭锦旗| 建阳市| 名山县| 九江县| 瑞丽市| 乌什县| 海门市| 江都市| 承德县| 孝义市| 固原市| 洛川县| 涟源市| 错那县| 黑河市| 阿克陶县| 来安县| 岐山县| 古浪县| 嘉定区| 穆棱市| 邵东县| 津南区| 桦川县| 响水县| 汽车| 天全县| 平阳县| 仲巴县| 慈溪市| 定边县| 唐海县| 隆林| 柘荣县| 太保市| 岑巩县| 清涧县|