xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

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

資源簡介

C++實戰(zhàn)源碼-訪問類中私有成員的函數(shù)(入門級實例216).zip

資源截圖

代碼片段和文件信息

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

#include?“stdafx.h“
#include?“ioStream.h“
#include?“string.h“

typedef?char?String[30];

class?CPerson
{
private:
String?name;//姓名
int?age;//年齡
public:
CPerson(String?Nameint?Age)//構(gòu)造函數(shù)
{
strcpy(nameName);
age?=?Age;
}
friend?char?*?GetName(CPerson&p);//定義友員函數(shù)
};

char?*?GetName(CPerson&p)//獲取CPerson類私有信息
{
return?p.name;
}

int?main(int?argc?char*?argv[])
{

CPerson?p(“張三“25);
cout?< return?0;
}


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????573??2010-10-14?14:51??Friend\Friend.cpp
?????文件????????4536??2010-10-14?14:21??Friend\Friend.dsp
?????文件?????????537??2010-10-14?14:21??Friend\Friend.dsw
?????文件?????????293??2010-10-14?14:21??Friend\StdAfx.cpp
?????文件?????????769??2010-10-14?14:21??Friend\StdAfx.h

評論

共有 條評論

相關(guān)資源