boost Array Example

 1 #include <iostream>
 2 #include "boost/multi_array.hpp"
 3 
 4 using namespace std;
 5 
 6 int main() {
 7     boost::array<int, 4> array = {{1,2,3,4}};
 8     for (int i = 0; i<4; i++)
 9         cout <<array[i] <<" ";
10 
11     cout <<endl;    
12 
13     return 0;
14 }

./Boost_Array_Example
1 2 3 4

posted @ 2017-03-21 22:47  souwang  阅读(176)  评论(0编辑  收藏  举报