Insert items from the user onto a Queue and then read them back at the terminal
cmake_minimum_required(VERSION 3.3)
project(Queue_Demo)
create_simple_executable(${PROJECT_NAME} Queue_Demo.cpp)
static const size_t ARRAY_SIZE = 4;
int array[ARRAY_SIZE];
pwOut.
printf(
"Please enter a number at each of the following six prompts:\n");
for (int i = 0; i < 6; ++i) {
int x;
pwIn >> x;
}
pwOut <<
"I received the following (" << ARRAY_SIZE <<
") values in this order:\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;
}