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

 
}
相关推荐
csdn_aspnet4 小时前
C++ 使总距离最短的最佳点位置(Optimum location of point to minimize total distance)
c++·算法
星恒随风5 小时前
C++11 加餐(4)并发支持库——condition_variable 条件变量与生产者消费者模型
开发语言·c++
你不知道我是谁?6 小时前
GESP C++ 补充知识:浮点数格式化输出(%f/%e/%g)与 fmod 浮点余数实战
开发语言·c++
Rabitebla7 小时前
【Linux】 文件系统(五):挂载与软硬链接,多个文件系统怎样组成统一目录树
linux·运维·服务器·c++·笔记·学习·算法
WL学习笔记9 小时前
继承(C++)
c++·继承
lcj251110 小时前
【日志系统实战】同步/异步日志系统:手写日志等级模块,吃透enum class与7大分级,面试不慌
c++·设计模式·面试·c++11·日志系统
zmzb010310 小时前
C++课后习题训练记录Day216
数据结构·c++·算法
西西弗Sisyphus11 小时前
C++ 最小 Agentic Loop 实现 - 开始实现 完整的内容
开发语言·c++
天威?*12 小时前
团体程序设计天梯练习集L3-001 凑零钱
数据结构·c++
充值内卷13 小时前
Varsar:一个 5.7 MB 的免安装文件对比工具
c++·比较工具