2.boost遍历数组容器
生活随笔
收集整理的這篇文章主要介紹了
2.boost遍历数组容器
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 #include <iostream>
2 #include <string>
3 #include<boost/array.hpp>//區別
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 }
?
轉載于:https://www.cnblogs.com/xiaochi/p/8651535.html
總結
以上是生活随笔為你收集整理的2.boost遍历数组容器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: FileInputStream与File
- 下一篇: 网络编程基础之C/S架构和TCP/IP协