This program illustrates the use of input and output stream iterators. First we look at output stream iterators. Press Enter to continue ... We begin by displaying the contents of an array of odd integers using the STL copy algorithm and and an "anonymous" output stream iterator: 1 3 5 7 9 Press Enter to continue ... Next we copy the values from an array of even integers into a pre-sized vector of integers and then display the contents of the vector in the same way: 2 4 6 8 10 Press Enter to continue ... Now we display the same vector contents again, this time using a named output stream iterator which also uses a different value separator: 2 | 4 | 6 | 8 | 10 | Press Enter to continue ... Finally, we copy odd integers from an array and even integers from a vector to an output file and then display the file to confirm. The odd integers are output one per line. Press Enter to continue ... Here are the contents of stream_iterators.dat: 1 3 5 7 9 2 ! 4 ! 6 ! 8 ! 10 ! Press Enter to continue ... Now we turn our attention to input stream iterators. Press Enter to continue ... First we read some integers entered from the keyboard, using an anonymous input stream iterator connected to the standard input (the keyboard), and copy those integers to a vector, then display vector contents to confirm. Press Enter to continue ... Enter 5 integers (terminate with end-of-file on a new line): 11 22 33 44 55 ^Z Here are the vector contents: 11 22 33 44 55 Press Enter to continue ... Next we read some more integers entered from the keyboard, write their square roots directly to a file, then display the file to confirm. Press Enter to continue ... Enter any number of integers on the line below and terminate with an end-of-file on a new line: 12 34 56 78 90 ^Z Here are the contents of the file: 3.4641 5.83095 7.48331 8.83176 9.48683 Press Enter to continue ... Now we read the values from the previous output file, and write the ceiling of each value to the standard output, this time using named input and output stream iterators. Press Enter to continue ... Here are the resulting values: 4 6 8 9 10 Press Enter to continue ... Finally, we simply display the contents of the file stream_iterators.dat by incrementing an input stream iterator connected to that file. Press Enter to continue ... Here are the values from the file: 3.4641 5.83095 7.48331 8.83176 9.48683 Press Enter to continue ...