文件名称:string
介绍说明--下载内容均来自于网络,请自行研究使用
设计string类
要求:
1、为该类定义构造函数,析构函数和赋值操作。构造函数至少应有三个:无参构造函数、C风格字符串构造函数和复制构造函数
2、为string类提供必要的成员函数,可以参考C++类库的string类提供了那些成员函数,至少应包括下标访问,子串查找、获得C风格字符串、获得字符串长度、字符串比较这几个函数
3、利用该string类完成测试程序:统计一个文本文件中所有包含给定子串的单词,并按字典序无重复的打印输出这些单词-Design string class
Requirements:
1, defined for the class constructor, destructor and assignment operator. The constructor should be at least three: the no-argument constructor, C-style string
Constructor and copy constructor
Provide the necessary member function for the string class, you can refer to the C library string class provided that the member function should include at least
Subscr ipt to access, substring searches, access to C-style string to get the length of the string, the string comparison of these functions are
3, using the string class to complete the test program: Statistics in a text file containing words to the substring, according to the lexicographic repeat
Printout of these
要求:
1、为该类定义构造函数,析构函数和赋值操作。构造函数至少应有三个:无参构造函数、C风格字符串构造函数和复制构造函数
2、为string类提供必要的成员函数,可以参考C++类库的string类提供了那些成员函数,至少应包括下标访问,子串查找、获得C风格字符串、获得字符串长度、字符串比较这几个函数
3、利用该string类完成测试程序:统计一个文本文件中所有包含给定子串的单词,并按字典序无重复的打印输出这些单词-Design string class
Requirements:
1, defined for the class constructor, destructor and assignment operator. The constructor should be at least three: the no-argument constructor, C-style string
Constructor and copy constructor
Provide the necessary member function for the string class, you can refer to the C library string class provided that the member function should include at least
Subscr ipt to access, substring searches, access to C-style string to get the length of the string, the string comparison of these functions are
3, using the string class to complete the test program: Statistics in a text file containing words to the substring, according to the lexicographic repeat
Printout of these
(系统自动生成,下载前可以参看下载内容)
下载文件列表
string
......\string.cpp
......\string.h
......\text.txt
......\string.cpp
......\string.h
......\text.txt