We will analyse such code
std::forward_list list {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
auto it = list.begin();
std::advance(it, 4);
std::cout << "it: " << *it << std::endl;
auto it2 = list.begin();
std::advance(it2, 7);
std::cout << "it2: " << *it2 << std::endl;
list.erase_after(it, it2);
print(list);
int main() {
std::multimap map;
map.insert({5, "Five"});
map.insert({5, "Funf"});
map.insert({5, "Piec"});
map.insert({5, "Cinq"});
auto it = map.find(5);
for (; it != map.end() ; ++it) {
std::cout << it->first << " | " << it->second << '\n';
}
}
Your abilities after STL Containers training
- can use C++ documentation effectively
- use and choose proper container depending on requirements and restrictions
- know complexity of operations on container
Agenda
-
sequence containers (
array
,vector
,deque
,list
,forward_list
) -
associative containers (
map
,set
,unordered_map
,unordered_set
) - computational complexity in containers
-
adapters (
stack
,queue
,priority_queue
) -
tuple
-
bitset
- recap
Activities
- pre-work to be done before our training
- pre-test pre-test at the beginning
- exercises followed by trainers implementation
- coding dojo
- participants solutions code review
- post-work with code review
- post-test one week after the training
- certificate of completion
Duration
- 1 day (6 hours with breaks)
Form
- online
- classroom