Published on

C++ STL and Algorithms

Authors
  • avatar
    Name
    Abid Zaidi
    Twitter

Post about C++ STL and Algorithms

Standard template library (STL)

Core components

  • Containers
  • Algorithms
  • Iterators
  • Functors

Containers

#include <iostream>
#include <vector>
#include <list>
#include <map>
#include <set>

int main() {
    std::vector<int> v = {1, 2, 3, 4, 5};
    std::list<int> l = {1, 2, 3, 4, 5};
    std::map<int, std::string> m = {{1, "one"}, {2, "two"}};
    std::set<int> s = {1, 2, 3, 4, 5};


}