Example Walk-through
- start with empty project 1 template
- show them how to set line endings in clion
- Settings > Editor > Code Style > Line Separator - set to Unix and macOS
- Open train file and copy first 10 lines & paste into a new file
- Add new sample file to
CMakeLists.txt
- Simple Version 1:
- open file and read each line out and print to terminal.
- use
getline()
with no 3rd param.
- Simple Version 2:
- separate each section of the csv file out and skip the middle chunks that we aren’t using.
- use
getline(buffer, 300, ',');
to stop at commas
File I/O