用vector创建字符串数组对象,长度为5(30分)。 (1)手动输入以下5个英文句子,存入数组对象: do one thing at a time, and do well. vaction speak louder than words. never put off what you can do today until tomorrow. like author, like book. knowledge makes humble, ignorance makes proud. (2)编写函数,使得数组中的字符串按大小排序(按字符串比较的规则)。 (3)输出排序后的句子,并显示其长度。
时间: 2023-05-01 09:07:41 浏览: 83
使用Vector对象处理一组数(java)
5星 · 资源好评率100%
1. 用vector创建字符串数组对象,长度为5(30分):例如 vector<string> strArr(5);
2. 手动输入以下5个英文句子,存入数组对象:do one thing at a time, and do well. vaction speak louder than words. never put off what you can do today until tomorrow. like author, like book. knowledge makes humble, ignorance makes proud.(注意按字串比较的规则,按小写排列)。
3. 编写函数,使得数组中的字符串按大小排序(按字符串比较的规则)。
4. 输出排序后的句子,并显示其长度。
阅读全文