11.07.2015 Views

tYSR20

tYSR20

tYSR20

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

322Part V: Optional FeaturesThe FileInput program simply outputs the contents of the file that you specifyas shown in the following sample run:Enter the name of a fileMyName.txtStephen Davis is suave and handsomeand definitely not balding prematurelyPress any key to continue . . .What’s Up with endl?Most programs in this book terminate an output stream by inserting theobject endl. However, some programs include a \n within the text to outputa newline. What’s the deal?The \n is, in fact, the newline character. The expression cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!