Reading from a File into a Vector of a Class
Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=DIM01waMKZk
A few really important tools to help with your homework here:
Using getline to grab a whole line, then stringstream and getline to split it by column into each data field, then using stoi (or alternatives) to convert to ints when necessary.
Other Videos By Bill Kerney
2021-10-26 | Roughing out a level |
2021-10-26 | Playing CustomTF and Brief Introduction to Modding It |
2021-10-26 | C++ Trivia, Recursion, Proof by Induction |
2021-10-25 | Week 12 Day 1 - Parsing Input with Readlib |
2021-10-25 | The Definition(s) of Racism and Ethnicity |
2021-10-22 | Reading from Multiple Files at the Same Time |
2021-10-22 | The Therac-25 Tragedy and the Impact of Computer Science on the World |
2021-10-21 | UE4 Level Streaming, Math for Game Engines |
2021-10-21 | UE4 Inventory System, Modding Quake 1 |
2021-10-21 | Recursive Maze Solving |
2021-10-20 | Reading from a File into a Vector of a Class |
2021-10-20 | Framing Part II |
2021-10-19 | Intersection Testing |
2021-10-19 | Mergesort |
2021-10-18 | Scope Resolution Operator, Namespaces, Enum Classes |
2021-10-18 | Framing |
2021-10-16 | Fallacies: Appeal to Ignorance, Correlation is Causation |
2021-10-15 | The Society of Creative Anachronism |
2021-10-15 | C++ Member Functions |
2021-10-14 | Recursion Part I |
2021-10-14 | Linear Algebra for Games |
Tags:
csci 40
c++
fstreams
string streams
sstreams
i/o
reading from disk
vectors of classes