gpt4 book ai didi

c++ - 在 vector 中搜索字符串?

转载 作者:行者123 更新时间:2023-11-28 02:56:51 26 4
gpt4 key购买 nike

<分区>

如何在 vector 中搜索特定字符串?该搜索会返回什么?

我将名称设置为用户搜索输入。

find(user_list.begin(), user_list.end(), name)

我不确定如何将它实现到 bool 函数中,因为我不知道 find 会返回什么值。

函数是

bool BBoard::user_exists(const string &name, const string &pass) const{}

我现在遇到了很多关于它如何无法比较的错误。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com