(创建页面,内容为“== container == * begin(), end() * rbegin(), rend() * size() == vector == Resizable array. * Constructor: vector(), vector(size), vector(size, fill) * push_back(v...”) |
小 |
||
第20行: | 第20行: | ||
* erase(it) | * erase(it) | ||
Erase item at it. Return item after it. | Erase item at it. Return item after it. | ||
+ | |||
+ | * front(), back() | ||
+ | Easily access first & last element. | ||
== string == | == string == | ||
第36行: | 第39行: | ||
* count(val) | * count(val) | ||
+ | |||
+ | * begin(), rbegin() | ||
+ | Access min/max element. set only. | ||
== map == | == map == |
2017年7月29日 (六) 04:03的最新版本
container
- begin(), end()
- rbegin(), rend()
- size()
vector
Resizable array.
- Constructor: vector(), vector(size), vector(size, fill)
- push_back(val)
- pop_back()
list
Implements double-linked list.
- insert(it)
Insert before it. it == end(): insert at the end.
- erase(it)
Erase item at it. Return item after it.
- front(), back()
Easily access first & last element.
string
- Constructor: string(size, fill)
- length()
- substr(begin), substr(begin, count)
Obtain a substring.
set / unordered_set
- insert(val)
- erase(val), erase(it)
- find(val)
Return it, or end() if not found
- count(val)
- begin(), rbegin()
Access min/max element. set only.
map
- insert(pair(key, val))
- at(key)
Return val, throws if missing.
- find(key)
Return it, or end() if not found