The Standard Template Library in C++
Learn how to use the Standard Template Library in C++.
Introduction to the Standard Template Library
The C++ Standard Template Library (STL) is a vast topic we can’t discuss entirely in a small lesson. So here, we’ll compare it with the Java Collections Framework.
The STL mainly deals with three main components:
- Containers
- Algorithms
- Iterators
However, before getting too deep in STL, we’ll discuss templates. In C++, we use templates to create generalized functions and classes.
Why do we need generalized functions and classes? There are many reasons, but the biggest is that we can use any data type, such as integers, floating-point values, characters, etc., through generalized functions and classes. We can also use user-defined data.
Get hands-on with 1400+ tech skills courses.