#include #include #include "queue.h" using namespace std; int Queue::Length() { if (back < front) { return DATA_SIZE - front + back; } return back - front; } void Queue::PushBack(string s) { data[back] = s; back++; if (back == DATA_SIZE) { back = 0; } } string Queue::PopFront() { string temp = data[front]; front++; if (front == DATA_SIZE) { front = 0; } return temp; }