Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What other data structures are available in the C++ STL?

I'm already aware of the following:

  • arrays
  • bitsets
  • hash maps and sets
  • regular maps and sets
  • iterators
  • lists
  • pairs
  • tuples
  • queues, deques, and priority queues
  • stacks
  • valarrays
  • vectors

Is there any other type of data structure available in the C++ library. What I'm specifically looking for is graphs, but I'd also like to know what else is there.

Also, I'd like to know if there are any external libraries I can link with my projects to implement a graph.

like image 660
sj755 Avatar asked Oct 15 '25 04:10

sj755


1 Answers

It's "the C++ standard library" or something to that effect, not "the STL". That term refers to an initial draft of some specific data structures and algorithms. Not all of them made it into the standard library, and the standard library also contains other stuff (for example, all the iostream classes).

That looks like a complete list to me (you appear to be talking specifically about C++0x, since you mention tuples and arrays). I don't know if I would even consider bitsets and iterators to be "data structures", but I guess that's a fair description.

There is definitely not a graph implementation. Unfortunately. :( You can get one from Boost, though.

like image 181
Karl Knechtel Avatar answered Oct 16 '25 18:10

Karl Knechtel