CIS 1500 Lecture Notes - Lecture 16: Text Editor, Plaintext, Textedit

15 views2 pages

Document Summary

Announcements: lab exam grades are on moodle now, assignment two grades will be up tomorrow. Files are a great way to permanently store data that your program needs to have each time it runs. Save files, data files, startup parameters, etc. can all go in a file: a file is a type of stream. Streams are just a set of input (might be characters, might be binary) that has no identified endpoint: text files end in a special character called eof. Steps to use text files: declare: you must declare a file * variable for use with the file. File * infile; // file called infile, probably to be opened for reading: open: use the funciton fopen to open a file. Files can be opened in read(r), write(w), or append(a) mode. Additional modes include r+, w+, a+, but should be used carefully.

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