istream_iterator

Line 12 creates an istream_iterator that’s capable of extracting (inputting) int values from the standard input object cin. Line 14 dereferences iterator inputInt to read the first integer from cin and assigns that integer to number1. The dereferencing operator * applied to iterator inputInt gets the value from the stream associated with inputInt; this is similar to dereferencing a pointer. Line 15 positions iterator inputInt to the next value in the input stream. Line 16 inputs the next integer from inputInt and assigns it to number2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.188.64