Introducing Readlib

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=KPiV5iDqgbQ



Duration: 48:16
76 views
1


Some of my students asked about Readlib, and how to use the read() function with standard input and files, and how to detect errors with it. This is a pretty comprehensive demo of all the features in it.


It is a replacement for the standard input methods in C++, allowing you to write more compact, more readable, and more fault tolerant code.



Note: At the end I mention auto x = read(); should fail to compile, but technically it only fails when you try to do anything with it. On its own it will compile and do nothing.







Tags:
is50b
csci 26
readlib
c++
iostreams
ifstream
ostream