Programming II - Course 9 - Standard Template Library (STL) PDF
Document Details
Uploaded by GenialAntigorite2219
Transilvania University of Brașov
2024
Bianca Iacob
Tags
Summary
This document is a course material on the Standard Template Library (STL), focusing on programming concepts with topics like "array", "vector", "dequeue", "stack", and "queue". It's from the "Programming II" course at Transilvania University of Brasov, for the 2024 academic year.
Full Transcript
Programming II Course 9 - Standard Template Library (STL) Bianca Iacob Transilvania University of Brasov 2024 Bianca Iacob Transilvania University of Brasov 2024 1 / 66 Co...
Programming II Course 9 - Standard Template Library (STL) Bianca Iacob Transilvania University of Brasov 2024 Bianca Iacob Transilvania University of Brasov 2024 1 / 66 Contents 1 array 2 vector 3 dequeue 4 stack 5 queue 6 map and unordered_map 7 set and unordered_set 8 list 9 string Bianca Iacob Transilvania University of Brasov 2024 2 / 66 array array Bianca Iacob Transilvania University of Brasov 2024 3 / 66 array array Arrays in the STL are sequential containers that are very similar to static arrays. They are contiguous blocks of memory and have static dimensions. Although they are very similar to static arrays in C++, their member functions make them more efficient. Bianca Iacob Transilvania University of Brasov 2024 4 / 66 array Bianca Iacob Transilvania University of Brasov 2024 5 / 66 array Example array std::array data = {1, 2, 4, 5, 5, 6}; cout