What is the syntax for gaining access to items found in the STL

In general, how do I gain access to objects in the Standard Template Library?
Last edited on
What do you mean? you use them like any other object. You include their header and, use them! the headers are mostly eather (name of object) or stl_(name of object).h like #include <list> or #include <stl_pair.h>
You should include a corresponding header file that contains required declarations of STL. For example to use container std::vector you should to write, for example, the following

1
2
3
4
5
6
7
8
9
#include <vector>

int main()
{
   std::vector<int> v;
   // other code

   return 0;
}
Topic archived. No new replies allowed.