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)
    )
    );

 
}
相关推荐
CAE虚拟与现实38 分钟前
C/C++中“静态链接(Static Linking)” 和 “动态链接(Dynamic Linking)释疑
开发语言·c++·dll·动态链接库·lib库
fpcc42 分钟前
C++编程实践——标准库中容器存储目标分析
c++
包饭厅咸鱼43 分钟前
PatchCore-----训练,测试,c++部署 工业异常检测框架
开发语言·c++·视觉检测
许长安1 小时前
C++ 多态详解:从静态多态到动态多态
开发语言·c++·经验分享·笔记
煤球王子1 小时前
学而时习之:C++中的标准模板4
c++
蓑衣夜行1 小时前
Qt QWebEngine 开启硬件加速注意事项
开发语言·c++·qt·web·qwebengine
EverestVIP2 小时前
C++中的mutable关键字如何使用
c++
黑客思维者2 小时前
智能配电系统用户敏感数据脱敏详细设计:从静态遮盖到动态策略
c++·python·嵌入式系统·数据脱敏·智能配电系统
GoWjw3 小时前
内存管理【3】
linux·服务器·c++·ubuntu
liulilittle4 小时前
C++ 并发双阶段队列设计原理与实现
linux·开发语言·c++·windows·算法·线程·并发