The Standard Template Library (STL)

blender

Saloni Goyal

Posted on November 7, 2020

The Standard Template Library (STL)

Some languages provide keywords to perform specific tasks like print, eval, call, etc.

C++ used functions and classes for just about everything and tries not to add keywords as much as possible.

You can create a pile of functions or a pile of classes or a pile of both and then distribute it as a library for others to use.

  • Libraries can be linked into your application along with the object files, or
  • included into your code to be compiled

Every compiler that meets the ISO standard, includes a library called The Standard Library, popularly known as STL.

It allows you to build an application by using code that other people have already written.

Misconceptions About STL

Misconception

  • When I started learning C++ and even before that, I used to always hear about STL and worry that it is something vast and extensive and not something that I can completely master.

Instead, it is one of the most helpful features of C++.

  • Some people also think that STL is only useful for competitive programming and that is also not the case. It is useful to anyone who wants to work with C++.

  • With libraries like STL, you can write applications in C++ even if you don't fully understand the underlying mechanisms of your code.

  • It is like learning to drive a car. You can easily learn to drive a car without knowing how the car engine works. Ofcourse to be a better driver you would want to eventually learn the workings of a car, so that you can maintain it better but simply learning to drive is good enough to start.

Please leave out comments with anything you don't understand or would like for me to improve upon.

Thanks for reading!

💖 💪 🙅 🚩
blender
Saloni Goyal

Posted on November 7, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Type Safety in Functions
cpp Type Safety in Functions

November 22, 2020

Functions in C++
cpp Functions in C++

November 21, 2020

Keyboard Input
cpp Keyboard Input

November 21, 2020

Type Safety in C++
cpp Type Safety in C++

November 20, 2020