Question: C++ I need help to create a program that executes a simple queue data type. You must define the queue data type and use the

C++

I need help to create a program that executes a simple queue data type. You must define the queue data type and use the enqueue(), dequeue(), and displayQueue() functions. (Dont use C++ STL to execute queue logic) You may use a linked list , or just use a regular C array of integers. The input file (testfile.txt) will be the list of operations to carry out on a queue.

Example input file:

enqueue 6 enqueue 8 dequeue enqueue 4 enqueue 9 enqueue 8 dequeue dequeue dequeue

Sample output should look similar to this:

Enqueuing item: 6 Head: 6 :Tail Enqueuing item: 8 Head: 6 8 :Tail and so on.....

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!