C++ primer第五版练习11.1.4

ytaook 5 0 PDF 2021-04-18 03:04:25

C++初学者,分享一下想法。 单词计数程序。 从输入流中读取单词并计数,同一个单词的大小写算一个单词,忽略常见单词。 #include #include #include #include #include #include #include using namespace std; int main() { map word_count; set exclude{ the,and,a,or };//常见单词 string str, word; while (cin >> str) { if (exclude.find(str) == exclude.en

用户评论
请输入评论内容
评分:
暂无评论