文件名称:CPP3
- 所属分类:
- 其他小程序
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2013-05-08
- 文件大小:
- 296kb
- 下载次数:
- 0次
- 提 供 者:
- 大*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
模拟STL库中string类的功能,编写MyString类,至少实现字符串间的赋值、比较(包括>、<、=、!=)和字符串间的”+”(连接)操作,同时能通过下面列举的形式对字符串对象进行初始化。
如:MyString str1(“I am ”),str2=“a student”
if(str1>str2) cout<<“larger\n”
if(str1<str2) cout<<“smaller\n”
if(str1==str2) cout<<“equal\n”
if(str1!=str2) cout<<“unequal\n”
MyString str3=str1+str2
-Analog STL library string class, write MyString class, at least between string assignment and comparison (>, <, =, =), and the string between the "+" operation (connection) is, at the same time through the followingenumerated in the form of a string object is initialized.
Such as: MyString str1 ("I am"), str2 = "a student"
if (str1> str2) cout << "larger \ n"
if (str1 <str2) cout << "smaller \ n"
if (str1 == str2) cout << "equal \ n"
if (str1! = str2) cout << "unequal \ n"
MyString str3 = str1 str2
如:MyString str1(“I am ”),str2=“a student”
if(str1>str2) cout<<“larger\n”
if(str1<str2) cout<<“smaller\n”
if(str1==str2) cout<<“equal\n”
if(str1!=str2) cout<<“unequal\n”
MyString str3=str1+str2
-Analog STL library string class, write MyString class, at least between string assignment and comparison (>, <, =, =), and the string between the "+" operation (connection) is, at the same time through the followingenumerated in the form of a string object is initialized.
Such as: MyString str1 ("I am"), str2 = "a student"
if (str1> str2) cout << "larger \ n"
if (str1 <str2) cout << "smaller \ n"
if (str1 == str2) cout << "equal \ n"
if (str1! = str2) cout << "unequal \ n"
MyString str3 = str1 str2
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C++3
....\08电子多态性实验.doc
....\08电子多态性实验11.doc
....\C++3.cpp
....\C++3.dsp
....\C++3.dsw
....\C++3.ncb
....\C++3.opt
....\C++3.plg
....\c++实验3报告.doc
....\Debug
....\.....\C++3.exe
....\.....\C++3.ilk
....\.....\C++3.obj
....\.....\C++3.pch
....\.....\C++3.pdb
....\.....\vc60.idb
....\.....\vc60.pdb
....\复件 C++3.cpp