vector and array

#include<iostream>
#include<vector>
#include<array>

int main()
{
    using namespace std;

    int SIZE;

    cin >> LEN;

    vector<int> ar(LEN);
    
    array<int,LEN> br ={1,2,3,4,5};
    
    return 0;

};

  vector 类型直接初始化赋值会报错,但是array 可以直接初始化。

posted @ 2017-09-24 13:42  Bear_Guo  阅读(123)  评论(0编辑  收藏  举报