Which STL container should I use for a FIFO?
Since there are a myriad of answers, you might be confused, but to summarize: Use a std::queue. The reason for this is simple: it is a FIFO structure. You want FIFO, you use a std::queue. It makes your intent clear to anybody else, and even yourself. A std::list or std::deque does not. A list can … Read more