文件名称:CPP3
-
所属分类:
- 标签属性:
- 上传时间:2013-05-08
-
文件大小:296.32kb
-
已下载: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/
C++3/08电子多态性实验.doc
C++3/08电子多态性实验11.doc
C++3/C++3.cpp
C++3/C++3.dsp
C++3/C++3.dsw
C++3/C++3.ncb
C++3/C++3.opt
C++3/C++3.plg
C++3/c++实验3报告.doc
C++3/Debug/
C++3/Debug/C++3.exe
C++3/Debug/C++3.ilk
C++3/Debug/C++3.obj
C++3/Debug/C++3.pch
C++3/Debug/C++3.pdb
C++3/Debug/vc60.idb
C++3/Debug/vc60.pdb
C++3/复件 C++3.cpp
C++3/08电子多态性实验.doc
C++3/08电子多态性实验11.doc
C++3/C++3.cpp
C++3/C++3.dsp
C++3/C++3.dsw
C++3/C++3.ncb
C++3/C++3.opt
C++3/C++3.plg
C++3/c++实验3报告.doc
C++3/Debug/
C++3/Debug/C++3.exe
C++3/Debug/C++3.ilk
C++3/Debug/C++3.obj
C++3/Debug/C++3.pch
C++3/Debug/C++3.pdb
C++3/Debug/vc60.idb
C++3/Debug/vc60.pdb
C++3/复件 C++3.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.