Boost的array
1 #include <iostream> 2 #include <boost/array.hpp> 3 4 void main() 5 { 6 boost::array<int, 10>myarray = { 1,2,3,4,5,6,7,8,9,10 }; 7 8 boost::array<int, 10>::iterator ibegin = myarray.begin(); 9 boost::array<int, 10>::iterator iend = myarray.end(); 10 11 for (; ibegin != iend; ibegin++) 12 { 13 std::cout << *ibegin << std::endl; 14 } 15 }
时间: 2024-10-25 15:33:34