小编Mr *_* Vy的帖子

在vector <string> cocos2d-x中找到一个单词

我有一个矢量word_list,我想在word_list中找到一个单词.我用的是功能

bool Mylayer::existWord(vector<string> word_list, string word)
{ 
    if (std::lower_bound(word_list.begin(), word_list.end(), word) != word_list.end())
    {
        return true;
    }
    return false;
}
Run Code Online (Sandbox Code Playgroud)

但它并不确切.有人可以告诉我为什么吗?

c++ cocos2d-x

0
推荐指数
1
解决办法
796
查看次数

标签 统计

c++ ×1

cocos2d-x ×1