命名空间 std 没有成员any_of



我正在尝试查看字符串是否包含数字。当我在这个网站上搜索时,我看到了通过说std::any_of(password.begin(), password.end(), ::isdigit)来实现的,它应该返回布尔值,真或假。 但是,Visual Studio一直说命名空间std没有成员any_of。

std::any_of

驻留在需要包含的<algorithm>标头中:

#include <algorithm>

参考

相关内容

最新更新