使用C++,统计一段字符串或是文章中,有多少个不同的单词。
eg:字符串"I love you"
输出结果3
字符串"I love you you"
输出结果3
函数func1(string str) 统计个数
main函数测试
#include <iostream>
#include<string>
#include <set>
using namespace std;
void fun1(string ...
原创
2018-10-12 10:54:12 ·
1714 阅读 ·
0 评论