Previous Lecture | Lecture 8 | Next Lecture |
Lecture 8, Tue 10/22
File IO, Midterm Review
Code from lecture
Topics
File I/O basics
- Intro to lab03
- Examining text files using 1) an editor 2) cat command
- Opening a file: open()
- Reading a line from a file: getline()
- Reading until the end of file is reached
- Detecting failures
- Printing error messages to standard error with cerr
- When do we use exit() and why?