- 论坛徽章:
- 4
|
- Resizes the container so that it contains n elements.
- If n is smaller than the current container size, the content is reduced to its first n elements, removing those beyond (and destroying them).
- If n is greater than the current container size, the content is expanded by inserting at the end as many elements as needed to reach a size of n. If val is specified, the new elements are initialized as copies of val, otherwise, they are value-initialized.
- Notice that this function changes the actual content of the container by inserting or erasing elements from it.
复制代码 |
|