Tag: standard template library

C++ Vectors – std::vector – Containers Library

Vectors are sequence container (same as dynamic arrays) which resizes itself automatically. The size changes (i.e. vector can shrink or expand as needed at run time) when an element is inserted or deleted, with their storage being handled automatically by the container. Just like arrays, vector elements are placed in adjacent memory locations so that they can be accessed and traversed using iterators i.e. subscript operator [].

Read More

STL: The C++ Standard Template Library

The STL (Standard Template Library) was originally a third-party library from HP and later SGI, before its incorporation into the C++ standard. The standard does not refer to it as “STL”, as it is merely a part of the standard library, but many people still use that term to distinguish it from the rest of the library (input/output streams [known as IOstreams], internationalization, diagnostics, the C library subset, etc.).

Read More

An overview of Generic Containers in C++

Container classes are the solution to a specific kind of code reuse problem. They are building blocks used to create object-oriented programs. They make the internals of a program much easier to construct. A container class describes an object that holds other objects. Container classes are so important that they were considered fundamental to early object-oriented languages

Read More