Top "Stl" questions

The Standard Template Library, or STL, is a C++ library of generic containers, iterators, algorithms, and function objects.

Recommended way to insert elements into map

Possible Duplicate: In STL maps, is it better to use map::insert than []? I was wondering, when I insert element …

c++ stl stdmap
Why can't I make a vector of references?

When I do this: std::vector<int> hello; Everything works great. However, when I make it a vector …

c++ vector reference stl container-data-type
What does iterator->second mean?

In C++, what is the type of a std::map<>::iterator? We know that an object it of …

c++ stl iterator
How do you copy the contents of an array to a std::vector in C++ without looping?

I have an array of values that is passed to my function from a different part of the program that …

c++ stl vector copy
How could i create a list in c++?

How can I create a list in C++? I need it to create a linked list. How would I go …

c++ list stl linked-list
How to check if std::map contains a key without doing insert?

The only way I have found to check for duplicates is by inserting and checking the std::pair.second for …

c++ stl map
Iterate keys in a C++ map

Is there a way to iterate over the keys, not the pairs of a C++ map?

c++ stl
Using custom std::set comparator

I am trying to change the default order of the items in a set of integers to be lexicographic instead …

c++ stl
In STL maps, is it better to use map::insert than []?

A while ago, I had a discussion with a colleague about how to insert values in STL maps. I preferred …

c++ dictionary stl insert stdmap
std::string length() and size() member functions

I was reading the answers for this question and found that there is actually a method called length() for std::…

c++ string stl size