#pragma once #include using namespace std; // THIS QUEUE HAS A BUG! // The way that we handled front/back causes it to // break when the queue is full // I'm going to leave this example as-is so that we // can walk through fixing it later // It's a good exercise if you're looking for a // debugging problem to work on const int DATA_SIZE = 5; class Queue { private: string data[DATA_SIZE]; int front, back; public: Queue() { front = 0; back = 0; } void PushBack(string s); string PopFront(); bool Empty() { return front == back; } int Length(); };