通过本文主要向大家介绍了c++ boost,c++ boost库,boost c++ libraries,c++ array,c++中string的用法等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
本文实例讲述了C++之boost::array的用法,分享给大家供大家参考。具体如下:
#include <iostream>
#include <boost/array.hpp>
#include <algorithm>
using namespace std;
int main()
{
boost::array<int, 5> array_temp = {{12, 8, 45, 23, 9}};
sort(array_temp.begin(), array_temp.end());
copy(array_temp.begin(), array_temp.end(), ostream_iterator<int>(cout, " "));
return 0;
}</div>
希望本文所述对大家的C++程序设计有所帮助。
</div>