2.boost遍历数组容器
生活随笔
收集整理的這篇文章主要介紹了
2.boost遍历数组容器
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1 #include <iostream>
2 #include <string>
3 #include<boost/array.hpp>//區(qū)別
4 using namespace std;
5
6 void main()
7 {
8 boost::array<int, 10> myarray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
9 boost::array<int, 10>::iterator ibegin = myarray.begin();
10 boost::array<int, 10>::iterator iend = myarray.end();
11 for (;ibegin!=iend;ibegin++)
12 {
13 cout << *ibegin << endl;
14 }
15 cin.get();
16 }
?
轉(zhuǎn)載于:https://www.cnblogs.com/xiaochi/p/8651535.html
總結(jié)
以上是生活随笔為你收集整理的2.boost遍历数组容器的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: FileInputStream与File
- 下一篇: 网络编程基础之C/S架构和TCP/IP协