COSC 175 Lecture Notes - Lecture 13: Batch Processing

44 views3 pages

Document Summary

C++ can write and read from files just as to keyboard and screen: standard input file keyboard, standard output file screen. Advantages: can edit data, prepare ahead of time, can rerun file without reentering data, can examine output at leisure, can display output to screen or print, can use out as input into another programs. File named secondary memory area that holds a collection of information (data) Internal file: composed of characters only, differs from . doc(x) file, size of file, can be created in notepad, visual c. Open the file as an output file. Close the file (happens automatically when you exit the program) Ofstream: means that you are going to write to the file. Online time you need to name the file. The file doesn"t exist: it just creates it. The file does exist: it (cid:449)rites o(cid:448)er it, it"s gone. Infile points to file (can be any name) Infile >> cityname >> fahrtemp; (start and restart step)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents