Week 5 - File I/O & Formatting
Learning Objectives
Upon finishing this learning module, you should be able to:
- Read and write text-based files
- Format stream output
Quiz 2 is open this Thurs-Saturday. Covers weeks 3 and 4.
Schedule
Day 1
Day 2
- Working directory
- Text parsing & String streams
- Check out assignment
Day 3
Day 4
- Take midterm or start in on week 6 material
- Review for and take Quiz 2
I/O Formatting
Read Ch 4.10 on I/O formatting. This video explains the basics:
FileIO
Read Ch 13.1-13.3 on Reading and Writing Files. These videos introduce file writing and reading:
Working Directory
The working directory controls where your program will read and write files from. It is NOT always the same as the directory your program is in! Learn more about it in this video:
Text Parsing
Read 10.2.11 and 10.2.12 about strings streams and watch this quick video:
Then read Ch 13.4 on getline and then watch this video on when and how to use
getline
and when to use >>
:
Midterm Review
Look in the Files area of Canvas for the Practice Midterm. Practice doing it with pen and paper - you will not be able to use VSCode for the midterm!