I know that in C ++ there is a standard library vector. Is there a queue? An online search suggests that it may be, but not so much, if any.
Edit: Good. Thanks to the toners.
std :: queue (container adapter)
Yes, you can easily choose a base container if you are interested:
#include <queue> int main() { std::queue<int> myqueue; myqueue.push(3); int x = myqueue.front(); myqueue.pop(); // pop is void! }
Yes, there is std::queue . Implemented as โadaptersโ on top of an existing container (since this is basically just a specialization).
std::queue
std :: priority_queue and std :: queue
http://www.sgi.com/tech/stl/queue.html
Another good link for standard C ++ libraries is http://www.cplusplus.com .
In particular, their reference section: http://www.cplusplus.com/reference/ .
Here is their page for std :: queue: http://www.cplusplus.com/reference/stl/queue/ .
Alternatively, you can find std :: deque (double queue), depending on what you need for the queue