I know that there's a standard library vector in C++. Is there a queue? An online search suggests there might be, but there's not much about it if there is one.
Edit: All right. Thanks a ton guys.
Yes there is, you could choose the underlying container easily also if you are interested:
#include <queue>
int main()
{
std::queue<int> myqueue;
myqueue.push(3);
int x = myqueue.front();
myqueue.pop(); // pop is void!
}
std::queue (container adaptor)
Yes, there's std::queue
. Implemented as "adaptors", on top of an existing container (since it's basically just a specialization).
std::priority_queue and std::queue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With