编写程序,从vector<char>初始化string

#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main()
{
	vector<char>c = { '1', '2', '3' };
	string s(c.begin(),c.end());
	cout << s << endl;

	return 0;
}

  

posted @ 2016-09-14 15:34  KennyRom  阅读(6854)  评论(0编辑  收藏  举报