Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 3 and Version 4 of code/howto/STL


Ignore:
Timestamp:
Oct 9, 2008, 1:06:20 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/howto/STL

    v3 v4  
    33
    44== Overview ==
     5STL stands for Standard Template Library. The STL implements several useful containers. This site provides a short overview of the most important containers.
     6
    57|| '''vector''' || Like an array, every element has an index || Fast to access elements by position ||
    68|| '''list''' || Elements are connected in a list, strictly ordered || Fast if you just want to store elements ||
     
    911
    1012== Reference ==
    11 For more information have a look at the [http://www.cplusplus.com/reference/stl/ reference].
     13For more information have a look at the [http://www.cplusplus.com/reference/stl/ reference]. Strongly recommended.
    1214
    1315== Usage ==
    1416=== vector ===
    1517{{{
     18#include <vector>
     19
    1620std::vector<type> myVector;
    1721
     
    2933== list ==
    3034{{{
     35#include <list>
     36
    3137std::list<type> myList;
    3238
     
    5662== set ==
    5763{{{
     64#include <set>
     65
    5866std::set<type> mySet;
    5967
     
    8593=== map ===
    8694{{{
     95#include <map>
     96
    8797std::map<std::string, type> myMap; // Note: map has two template arguments, key and type
    8898