使用c ++构建错误 - 'find_if'不是'std'的成员

bob*_*bob 17 c++ build

在构建项目时,我得到了这个神秘的错误:

'find_if'不是'std'的成员

find_if()以这种方式使用:std :: find_if(...).

知道它可能来自哪里?

Ale*_*heo 39

添加包含:

#include <algorithm>
Run Code Online (Sandbox Code Playgroud)

到你的实现文件.


tro*_*foe 10

包括<algorithm>头文件:

#include <algorithm>
Run Code Online (Sandbox Code Playgroud)


Dum*_*der 9

你有没有标题?

#include <algorithm> 
Run Code Online (Sandbox Code Playgroud)


Fra*_*ser 9

你需要 #include <algorithm>