#include "stdafx.h"
#include<boost\array.hpp>
#include<sstream>
using namespace std;
int main()
{
const int _size = 10;
boost::array<double, _size> arr;
//赋值
for (size_t i = 0; i < 10; i++)
{
arr.at(i) = i;
}
//数值转换为字符串
stringstream ss;
for (size_t i = 0; i < _size; i++)
{
ss << arr.at(i)<<",";
}
//移除最后一个逗号
string str = ss.str();
str.resize(str.length() - 1);
//输出arr的个数
printf(str.c_str()/*字符串转换为常量字符串*/);
//接收一个字符表示结束
char over[1];
scanf_s(over);
return 0;
}