Wiki
Improved STL programming
About 2 min read
1.STL improves programming
This chapter organizes the core usage of STL: first acquaintance with STL, fixed arrays, strings, sequential containers, container adapters, associative containers, function objects, predicates, and common algorithms.
2.Learning Sequence
std::array: Fixed-size array, suitable as a replacement for C-style fixed-length arrays.string: String container, responsible for string construction, assignment, concatenation, search, and substring extraction.vector/deque: Commonly used sequence containers, one suitable for contiguous storage at the tail, the other suitable for operations at both ends.stack/queue/list: Container adapters and linked lists, suitable for specific access patterns.set/map: Associative containers, suitable for deduplication, sorting, and key-value lookup.- Function objects and predicates: using "callable logic" as algorithm parameters.
- Common algorithms: traversal, search, sorting, copy and replace, arithmetic generation, and set algorithms.