文件名称:Array
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2015-08-24
- 文件大小:
- 2.84mb
- 下载次数:
- 0次
- 提 供 者:
- 仇**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
3.编写程序:定义一个Person类,要求:
①私有成员数据:
●char ID[ 20 ] //身份证号
●char *name //存放姓名的动态字符数组的起始地址
●char *address //存放住址的动态字符数组的起始地址
②公有成员函数:
●Person ( char *n=0, char *na=0, char *ad=0 ) //构造函数
●Person ( Person &p ) //拷贝构造函数,实现深拷贝
●~ Person ( ) //析构函数
●Person & operator= ( Person &p ) //实现深赋值
●void show() //输出各成员数据
③编写main()函数对Person类进行测试。-3. Write a program: Define a Person class requirements: ① private member data: ● char ID [20] // ID number ● char* name // store name starting address dynamic character array ● char* address // store address the dynamic character array starting address ② public member functions: ● Person (char* n = 0, char* na = 0, char* ad = 0) // constructor ● Person (Person & p) // copy constructor, to achieve deep copy ● ~ Person () // destructor ● Person & operator = (Person & p) // achieve deep assignment ● void show () // output data ③ members write main ( ) function of the Person class to be tested.
①私有成员数据:
●char ID[ 20 ] //身份证号
●char *name //存放姓名的动态字符数组的起始地址
●char *address //存放住址的动态字符数组的起始地址
②公有成员函数:
●Person ( char *n=0, char *na=0, char *ad=0 ) //构造函数
●Person ( Person &p ) //拷贝构造函数,实现深拷贝
●~ Person ( ) //析构函数
●Person & operator= ( Person &p ) //实现深赋值
●void show() //输出各成员数据
③编写main()函数对Person类进行测试。-3. Write a program: Define a Person class requirements: ① private member data: ● char ID [20] // ID number ● char* name // store name starting address dynamic character array ● char* address // store address the dynamic character array starting address ② public member functions: ● Person (char* n = 0, char* na = 0, char* ad = 0) // constructor ● Person (Person & p) // copy constructor, to achieve deep copy ● ~ Person () // destructor ● Person & operator = (Person & p) // achieve deep assignment ● void show () // output data ③ members write main ( ) function of the Person class to be tested.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Array\array.cpp
.....\Array.dsp
.....\Array.dsw
.....\array.h
.....\Array.ncb
.....\Array.opt
.....\Array.plg
.....\Array.sdf
.....\Array.sln
.....\Array.v12.suo
.....\Array.vcxproj
.....\Array.vcxproj.filters
.....\Backup1\Array.sln
.....\.......\Array.v12.suo
.....\Debug\Array.exe
.....\.....\Array.ilk
.....\.....\Array.log
.....\.....\array.obj
.....\.....\Array.pdb
.....\.....\......tlog\Array.lastbuildstate
.....\.....\..........\CL.read.1.tlog
.....\.....\..........\CL.write.1.tlog
.....\.....\..........\link.read.1.tlog
.....\.....\..........\link.write.1.tlog
.....\.....\vc120.idb
.....\.....\vc120.pdb
.....\.....\vc60.idb
.....\.....\vc60.pdb
.....\UpgradeLog.htm
.....\UpgradeLog2.htm
.....\Debug\Array.tlog
.....\Backup
.....\Backup1
.....\Debug
Array