首页 > 代码库 > boost Array Example

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

boost Array Example