
STL模板库
一个早起的程序员
主要从事FPGA、ZYNQ、CPU内核、MicroBlaze、STM32、QT、MFC、上位机相关开发,擅长高速接口、视频传输、视频采集,包括PCIe、USB3.0、光纤、SDI、VGA、DVI、HDMI等高速接口。大学期间在学校参加过全国电子设计大赛两届、全国物联网大赛、山东省电子设计大赛、全国信息杯等比赛,并获得全国奖和省级奖十余项。
展开
-
usage of stack and queue
# include # include # include # include using namespace std; void StackUsage() { stack s; cout << "Enter the Stack" <<endl; for(int i=0; i<5; i++) { s.push(i/100.0); cout << "q" << i原创 2016-07-06 14:15:32 · 390 阅读 · 0 评论 -
usage of map
# include # include # include using namespace std; class student { public: string name; int age; int num; }; map mstudent; map::iterator mstudentit = mstudent.begin(); void InsertSt原创 2016-07-06 14:05:27 · 466 阅读 · 0 评论 -
usage of vector
STL提供了一组表示容器、迭代器、函数对象和算法的模板。容器是一个与数组类似的单元,可以存储若干个值。这里面都是基于泛型变成,也就是使用函数模板和类模板技术。 下面我们来介绍第一个比较常用的 vector: vector是C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。vector之所以被认为是一个容器,是因为它能够像容器一样存放各种类型的对象,简单原创 2016-05-31 15:53:03 · 663 阅读 · 0 评论 -
usage of list and iterator
# include # include # include // 对收尾进行大量操作的时候用 list // queue 是按某种规则进行的操作,和list有差别带式可以被list代替 using namespace std; int main() { list l; for(int i=0; i<5; i++) { l.push_back((i + 1)/100.0);原创 2016-07-06 14:31:25 · 410 阅读 · 0 评论 -
usage of algorithm
# include # include # include # include // for_each() using namespace std; // 回调函数 void current(int& v) { cout << v << endl; } void print(vector vec) { cout << "The Elements are : " <<原创 2016-07-06 14:21:41 · 605 阅读 · 0 评论