DEV Community

Cover image for The Standard Template Library (STL)
Saloni Goyal
Saloni Goyal

Posted on • Edited on

4

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!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (2)

Collapse
 
nemanajay profile image
Ajay Neman

STL is the heart of Every competitive coder. R u doing competitive coding ?

Collapse
 
blender profile image
Saloni Goyal

Hi Ajay! No, I am currently more focused towards development. And yes STL is an absolute blessing for C++ developers.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay