第五次作业

   作业要求:

git:https://github.com/775320358/list/blob/master/5.cpp

查找指定单词频率:

  for (int j = 0; j < wCount - 1; j++)                                  //统计单个单词的个数
    {
        if (words[j].Str == searchword)
        {
            cout << searchword << ":" << words[j].Count<<endl;
            searchword = "true";                                          //未找到做记号
        }
    }
    if (searchword != "true")
    {
        cout << "not find word";
    }

 

总结:在上次编程的基础上增加查找词频即可。但仍不知如何实现那个要求。

posted @ 2016-03-29 21:20  钱佳晨  阅读(128)  评论(1编辑  收藏  举报