Insert items from the user onto a Queue and then read them back at the terminal
cmake_minimum_required(VERSION 3.12)
project(Queue_Demo)
create_simple_executable(${PROJECT_NAME} Queue_Demo.cpp)
static const size_t ARRAY_SIZE_1 = 4;
int array[ARRAY_SIZE_1];
Queue<int> buffer(array);
pwOut.
printf(
"Please enter a number at each of the following six prompts:\n");
for (int i = 0; i < 6; ++i) {
}
pwOut <<
"I received the following (" << ARRAY_SIZE_1 <<
") values in this order:\n";
while (buffer.size())
pwOut <<
" " << buffer.dequeue() <<
"\n";
pwOut <<
"The Queue instance only had space for four objects, so you'll notice that\n"
<< "the first two numbers you entered are no longer in the Queue.\n";
return 0;
}