Class 4: File I/O and Vectors
We've been hired to create a program that analyzes the results of a surf competition and determines the top three scores! To solve this problem, we'll learn how to read data from textfiles (File I/O) and also how to easily store large amounts of data using containers!
Topics to discuss:
File Streams and Permissions
The Fstream Object
Opening, Closing, and Manipulating Files
Datatype Conversions
C++ Vector Containers (Syntax, Initialization, and Usage)
Looping through Containers
Zero-based Indexing
Segmentation Faults
Computing Statistics about File Data
The "Three Highest Surf Scores" Program
Topics to discuss:
File Streams and Permissions
The Fstream Object
Opening, Closing, and Manipulating Files
Datatype Conversions
C++ Vector Containers (Syntax, Initialization, and Usage)
Looping through Containers
Zero-based Indexing
Segmentation Faults
Computing Statistics about File Data
The "Three Highest Surf Scores" Program