Fix the errors pls;
I was trying to write a queue using array and struct.
this is the given hpp;
#ifndef HW4_TODO_QUEUEARRAY
#define HW4_TODO_QUEUEARRAY
#include <string>
struct TodoItem
{
std::string todo;
};
const int MAX_QUEUE_SIZE = 5;
class TodoQueueArray
{
public:
TodoQueueArray();
bool isEmpty();
bool isFull();
void enqueue(std::string todoItem);
void dequeue();
TodoItem* peek();
int getQueueFront() { return queueFront; }
int getQueueEnd() { return queueEnd; }
TodoItem** getQueue() { return queue; }
private:
int queueFront; //the index in queue[] that will be dequeuednext
int queueEnd; //the index in queue[] that was most recentlyenqueued
TodoItem* queue[MAX_QUEUE_SIZE];
};
#endif
this is my code for cpp:
#include <iostream>
#include “HW4-Todo-QueueArray.hpp”
using namespace std;
TodoQueueArray::TodoQueueArray()
{
queueFront=-1;
queueEnd=-1;
}
bool TodoQueueArray::isEmpty()
{
if(queueFront == -1 && queueEnd == -1)
{
return true;
}
else
{
return false;
}
}
bool TodoQueueArray::isFull()
{
if(queueEnd==MAX_QUEUE_SIZE-1)
{
return true;
}
else
{
return false;
}
}
void TodoQueueArray::enqueue(std::string todoItem)
{
if(isFull())
{
cout << “Queue full, cannot add new todo item.”<<endl;
}
else
{
queueEnd++;
struct TodoItem*
PayPal Gateway not configured
PayPal Gateway not configured