CPP-STL

Some notes on C++ STL.

std::vector

https://en.cppreference.com/w/cpp/container/vector

1
2
3
4
template<
class T,
class Allocator = std::allocator<T>
> class vector;

(construtor) :

push_back(): Add an element to the end.

std::unordered_map

https://en.cppreference.com/w/cpp/container/unordered_map

1
2
3
4
5
6
7
template<
class Key,
class T,
class Hash = std::hash<Key>,
class KeyEqual = std::equal_to<Key>,
class Allocator = std::allocator<std::pair<const Key, T>>
> class unordered_map;

find(): Returns an iterator to the element if found, otherwise it returns end().