CPlusPlusThings/c++2.0/uniform_initialization.cpp
Light-City 4f8b242a10 update
2019-11-05 17:27:32 +08:00

14 lines
286 B
C++

//
// Created by light on 19-11-2.
//
#include <iostream>
#include <vector>
using namespace std;
int main() {
int value[]{1, 2, 3}; // initializer_list<T> 会关联一个array<T,n> 里面元素被编译器逐一分解传给函数
vector<int> v{2, 3, 5};
return 0;
}