c++ reference vector
墨初 知识笔记 82阅读
What is vector in C++?
答：1) std::vector is a sequence container that encapsulates dynamic size arrays. The elements are stored contiguously, which means that elements can be accessed not only through iterators, but also using offsets to regular pointers to elements.
What is the difference between vector and PMR in C++?
答：1) std::vector is a sequence container that encapsulates dynamic size arrays. 2) std::pmr::vector is an alias template that uses a polymorphic allocator.
What is vector in C++ STL?
答：vector 是 C++ STL的一个重要成员，使用它时需要包含头文件： #include< vector >; 一、 vector 的初始化：可以有五种方式,举例说明如下 (1) vector... C++ _ vector 操作
Is it possible to constexpr a vector in C++?
答：Member functions of std::vector are constexpr: it is possible to create and use std::vector objects in the evaluation of a constant expression. However, std::vector objects generally cannot be constexpr, because any dynamically allocated storage must be released in the same evaluation of constant expression. (since C++20)