1. 包含一个头文件: 1 #include <vector> 2. 申明及初始化: std::vector<int> first; // empty vector of ints std::vector<,); // four ints with value 100 std::vector<int> third (second.begin(),second.end()); // iterating through second std::vector<in…
Reference Constructors vector Constructs a vector of a specific size or with elements of a specific value or with a specific allocator or as a copy of some other vector. Typedefs allocator_type A type that represents the allocator class for the vecto…