1.新学的vector数值初始化方法

#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<int> ans{1,2,3};
    for(auto i:ans)
        cout<<i<<endl;
    return 0;
}

 

posted on 2020-02-12 19:32  黑暗尽头的超音速炬火  阅读(166)  评论(0)    收藏  举报