文件名称:asd
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:7.43kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1. 编写程序完成如下功能:
⑴ 编写一个自己的字符串类MyString,它有一个私有的数据成员:指向字符串的指针m_data。编写该类的构造函数、拷贝构造函数和析构函数,在构造函数和拷贝构造函数中动态申请内存空间赋值给m_data。用于存储字符串。在析构函数中释放内存空间。
⑵ 重载运算符“+”作为类MyString的成员函数,使能完成字符串相加功能。
⑶ 编写main函数,测试该类及被重载的运算符。-A written procedure performs the following functions: ⑴ write a string class MyString, it has a private data member: pointers to strings m_data. Write the class constructor, copy constructor and destructor, constructor and copy constructor dynamic application memory space assigned to m_data. For storing strings. Destructor to free up memory space. ⑵ overloaded operators " +" as a the class MyString member function, so that the complete string together. ⑶ write the main function to test the class and overloaded operators.
⑴ 编写一个自己的字符串类MyString,它有一个私有的数据成员:指向字符串的指针m_data。编写该类的构造函数、拷贝构造函数和析构函数,在构造函数和拷贝构造函数中动态申请内存空间赋值给m_data。用于存储字符串。在析构函数中释放内存空间。
⑵ 重载运算符“+”作为类MyString的成员函数,使能完成字符串相加功能。
⑶ 编写main函数,测试该类及被重载的运算符。-A written procedure performs the following functions: ⑴ write a string class MyString, it has a private data member: pointers to strings m_data. Write the class constructor, copy constructor and destructor, constructor and copy constructor dynamic application memory space assigned to m_data. For storing strings. Destructor to free up memory space. ⑵ overloaded operators " +" as a the class MyString member function, so that the complete string together. ⑶ write the main function to test the class and overloaded operators.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
asd.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.