list、deque 到 vector 的转化
int main() { deque<int> b = {1,2,3}; list<int> c = {4,5,6}; vector<int> a1(vector<int>{b.begin(),b.end()}); vector<int> a2(vector<int>{c.begin(),c.end()}); for(int i : a1) cout << i << ' '; cout << endl; for(int i : a2) cout << i << ' '; }