> For the complete documentation index, see [llms.txt](https://roychanghua.gitbook.io/cpp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roychanghua.gitbook.io/cpp/yong-fa/vector.md).

# vector

初始化vector

```cpp
v = vector<int>(10,-1);	//now v is a vector with size 10 and values -1
for(int i : v) cout << i << ' ';
```
