第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

請(qǐng)問結(jié)果不一樣是么原因?

#include?<iostream>using?namespace?std;class?Coordinate{	public:		Coordinate(int?_x,int?_y);		~Coordinate();		int?getX();		int?getY();	private:		int?x,y;?};class?Line{	public:		Line(int?x1,int?y1,int?x2,int?y2);		~Line();		void?printLine();	private:		Coordinate?*A;		Coordinate?*B;};Coordinate::Coordinate(int?_x,int?_y){	cout?<<?"正在執(zhí)行?點(diǎn)類?構(gòu)造函數(shù)...??";?	x?=?_x;	y?=?_y;	cout?<<?"("?<<?x?<<?","?<<?y?<<?")"?<<?endl;?}Coordinate::~Coordinate(){	cout?<<?"正在執(zhí)行點(diǎn)類析構(gòu)函數(shù)..."?<<?endl;?}int?Coordinate::getX(){	return?x;}int?Coordinate::getY(){	return?y;}Line::Line(int?x1,int?y1,int?x2,int?y2){	cout?<<?"正在執(zhí)行?線類?構(gòu)造函數(shù)..."?<<?endl;	A?=?new?Coordinate?(x1,y1);	B?=?new?Coordinate?(x2,y2);}Line::~Line(){	cout?<<?"正在執(zhí)行線類析構(gòu)函數(shù)..."?<<?endl;	delete?A;	A?=?NULL;?	delete?B;	B?=?NULL;}void?Line::printLine(){	cout?<<?"線類信息打印...?";	cout?<<?"("?<<?A->getX()?<<?","?<<?A->getY()?<<?")?";	cout?<<?"("?<<?B->getX()?<<?","?<<?B->getY()?<<?")"?<<?endl;}?int?main?(void){	Line?*line?=?new?Line?(1,2,3,4);	line->printLine();	cout?<<?"line對(duì)象的大小為:?"?<<?sizeof(line)?<<?endl;	cout?<<?"Line類型的大小為:?"?<<?sizeof(Line)?<<?endl;	delete?line;	line?=?NULL;}


正在回答

1 回答

哪有showB,這樣直接粘貼過來是沒有格式的哦

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
C++遠(yuǎn)征之封裝篇(下)
  • 參與學(xué)習(xí)       70903    人
  • 解答問題       534    個(gè)

封裝--面向?qū)ο笕筇卣髦?,通過案例讓C++所學(xué)知識(shí)融會(huì)貫通

進(jìn)入課程

請(qǐng)問結(jié)果不一樣是么原因?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)