C++ vector容器的用法(非常详细) - C语言中文网 vector 是一个大小可变的元素序列,保证连续地存储在内存中,这使得 vector 的内容可以很容易地传递给一个类 C 的函数——该函数接受一个指向数组元素的指针(通常是一个大小)。
std:: vector - cppreference. com The storage of the vector is handled automatically, being expanded as needed Vectors usually occupy more space than static arrays, because more memory is allocated to handle future growth