c++ STL六大部件

cpp 复制代码
#include <iostream>
#include <vector>
#include <functional>
#include <algorithm>

using namespace std;

int main()
{
    int ia [] = { 10,20,5,55,25 };
    vector<int,allocator<int>> v(ia, ia + 6);
    cout << count_if(v.begin(), v.end(), not1(
        bind2nd(less<int>(), 40)
    )
    );

 
}
相关推荐
「QT(C++)开发工程师」12 小时前
C++ 策略模式
开发语言·c++·策略模式
似霰13 小时前
Linux timerfd 的基本使用
android·linux·c++
三月微暖寻春笋13 小时前
【和春笋一起学C++】(五十八)类继承
c++·派生类·类继承·基类构造函数·派生类构造函数
热爱编程的小刘13 小时前
Lesson05&6 --- C&C++内存管理&模板初阶
开发语言·c++
czy878747513 小时前
深入了解 C++ 中的 Lambda 表达式(匿名函数)
c++
CSDN_RTKLIB14 小时前
include_directories和target_include_directories说明
c++
Trouvaille ~14 小时前
【Linux】UDP Socket编程实战(二):网络字典与回调设计
linux·运维·服务器·网络·c++·udp·操作系统
明洞日记15 小时前
【图解软考八股034】深入解析 UML:识别标准建模图示
c++·软件工程·软考·uml·面向对象·架构设计
前端玖耀里15 小时前
Linux C/C++ 中系统调用与库函数调用的区别
linux·c语言·c++
艾莉丝努力练剑15 小时前
【Linux:文件】基础IO:文件操作的系统调用和库函数各个接口汇总及代码演示
linux·运维·服务器·c++·人工智能·centos·io