Previous Lecture | Lecture 6 | Next Lecture |
Lecture 6, Tue 07/16
File I/O
Lecture video
Stuff I wrote on the “whiteboard”
Go here and click on the appropriate date: https://1drv.ms/o/s!AlgIeD1urAgmgQU7loNfb3-LYrma
Code from lecture
https://github.com/ucsb-cs16-m19/code-from-class/tree/master/07-16
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