91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.96KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-02-21
  • 語言: C/C++
  • 標(biāo)簽:

資源簡介

C++實(shí)戰(zhàn)源碼-const函數(shù)的使用(入門級實(shí)例221).zip

資源截圖

代碼片段和文件信息

//?constFunction.cpp?:?Defines?the?entry?point?for?the?console?application.
//

#include?“stdafx.h“
#include
using?namespace?std;

class?Man //聲明一個(gè)Man類
{
private:
int?m_height;
int?m_weight;
public:
Man(int?hint?w);
void?display()const; //聲明一個(gè)常成員函數(shù)
};
Man::Man(int?h?int?w)
{
m_height=h;
m_weight=w;
}

void?Man::display()const //定義常成員函數(shù),在其中引用成員變量
{
cout<<“the?height?of?man?is?:“< cout<<“the?weight?of?man?is?:“<}

int?main()
{
Man?man(170120); //定義一個(gè)Man類的對象
man.display(); //通過這個(gè)對象調(diào)用常成員函數(shù)
return?0;
}



?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????673??2010-10-14?17:59??constFunction\constFunction.cpp
?????文件????????4620??2010-10-14?17:59??constFunction\constFunction.dsp
?????文件?????????551??2010-10-14?17:59??constFunction\constFunction.dsw
?????文件?????????300??2010-10-14?17:59??constFunction\StdAfx.cpp
?????文件?????????769??2010-10-14?17:59??constFunction\StdAfx.h

評論

共有 條評論

相關(guān)資源