W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
#include
#include
using namespace std; bool greater_than_5(int value) { return value > 5; } int main() { vector
numbers = {1, 7, 3, 5, 9, 2}; if (any_of(numbers.begin(), numbers.end(), greater_than_5)) { cout << "存在大于 5 的值"; } else { cout << "没有大于 5 的值"; } return 0; }