Merge pull request #854 from AllanDowney/index

update(index-list): add Vector
pull/857/head
Sunface 3 years ago committed by GitHub
commit ecbb40ba0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -362,9 +362,15 @@
## V
| 名称 | 关键字 | 简介 |
| ---- | ------ | ---- |
| | KWV | |
| 名称 | 关键字 | 简介 |
| ----------------- | -------- | ---------------------------------------------------------------------------------------------- |
| [Vector 动态数组] | 动态数组 | `Vec<T>`,动态数组允许你存储多个值,这些值在内存中一个紧挨着另一个排列。只能存储相同类型的元素 |
| `Vec::new` | | 创建动态数组 |
| `vec![]` | | 创建动态数组,能在创建时给予初始化值 |
| `Vec::push` | | 向数组尾部添加元素,必须声明为 `mut` |
| | KWV | |
[vector 动态数组]: https://course.rs/basic/collections/vector.html
[back](#head)

Loading…
Cancel
Save