编写程序,从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;
}

  

原文地址:https://www.cnblogs.com/KennyRom/p/5872463.html