作业帮 > 综合 > 作业

如何用C++统计一句句子中,(文字,符号,数字)的数量及对应的字串

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/21 06:25:22
如何用C++统计一句句子中,(文字,符号,数字)的数量及对应的字串
如下面的例子
Enter the string to be processed :Hello ,Today is 7 / 11 .Nice .
4 word(s):\x05Hello\x05Today\x05is\x05Nice
4 symbols(s):\x05,\x05/\x05.\x05.
2 integers(s):\x057\x0511
#include
#include
#include
using namespace std;
void main()
{
vector digit;
vector word;
vector symbol;
string str;
cout