boost 循环缓冲区
来源:互联网 发布:发短信软件手机软件 编辑:程序博客网 时间:2024/05/15 09:02
boost 循环缓冲区
#include <boost/circular_buffer.hpp>int _tmain(int argc, _TCHAR* argv[]){boost::circular_buffer<int> cb(3);// Insert some elements into the buffer.cb.push_back(1);cb.push_back(2);cb.push_back(3);int a = cb[0]; // a == 1int b = cb[1]; // b == 2int c = cb[2]; // c == 3// The buffer is full now, pushing subsequent// elements will overwrite the front-most elements.cb.push_back(4); // Overwrite 1 with 4.cb.push_back(5); // Overwrite 2 with 5.// The buffer now contains 3, 4 and 5.a = cb[0]; // a == 3b = cb[1]; // b == 4c = cb[2]; // c == 5// Elements can be popped from either the front or the back.cb.pop_back(); // 5 is removed.cb.pop_front(); // 3 is removed.int d = cb[0]; // d == 4return 0;}
0 0
- boost 循环缓冲区
- Boost学习之循环缓冲区--circular_buffer
- Boost::circular_buffer——循环缓冲区
- 循环缓冲区
- 循环缓冲区
- 循环缓冲区
- 套接字缓冲区 boost asio
- 循环缓冲区类
- 键盘输入循环缓冲区问题
- 队列实现循环缓冲区
- 循环缓冲区的定义
- Linux中的循环缓冲区
- Android 循环缓冲区
- 队列实现循环缓冲区
- boost循环队列 circular_buffer
- C++版循环缓冲区类
- 循环缓冲区的一点笔记
- Linux内核中的循环缓冲区
- C++引用传递和值传递
- 【零碎JAVA】java序列化
- 无线AP概念功率mW、灵敏度dBm、增益dBi
- 怎么通过XMLGregorianCalendar获得当前时间及当前时间的前十分钟的时间
- 关于String,你必须知道的东西!
- boost 循环缓冲区
- EL表达式 (详解)
- Android类参考---Fragment(八)
- 民民的爸爸是市里的二把也算是个有实权的
- Android启动过程分析
- 图
- js 实时刷新 暂停
- C#连接\访问MySQL数据库
- glpk 使用简介