PIC10B_lecture7

PIC10B_lecture7 - Reading and writing text files Streams,...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Reading and writing text files Streams, Part 1: Reading and Writing Text Files, Stream Hierarchies, and Stream Manipulators A. Barbaro UCLA PIC 10B Reading and writing text files Outline for Today: Streams (9.1-9.3 of Big C++ ) 1 Reading and writing text files Reading and writing text files Why is it useful to read from a file or write to a file? Allows the user to input vast amounts of information without having to do it manually Allows user to save information from the program after the program has finished Its fun! Reading and writing text files Why is it useful to read from a file or write to a file? Allows the user to input vast amounts of information without having to do it manually Allows user to save information from the program after the program has finished Its fun! Some caveats: You need to include another header file, fstream, in order to use file variables Reading and writing text files Why is it useful to read from a file or write to a file? Allows the user to input vast amounts of information without having to do it manually Allows user to save information from the program after the program has finished Its fun! Some caveats: You need to include another header file, fstream, in order to use file variables Reading and writing to text files slows the program down, because the program is accessing data in other locations on the computer Its good to limit the amount of reading and writing that goes on Reading and writing text files...
View Full Document

This note was uploaded on 10/23/2011 for the course PIC 10B taught by Professor Wittman during the Winter '08 term at UCLA.

Page1 / 18

PIC10B_lecture7 - Reading and writing text files Streams,...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online