Reading from/writing to a file

C/C++

Last Update Unknown

File Handling Header

Provides file handling functions including open, is_open, close, gcount, getline, ignore, peek, read, put, write, flush and more.


Reading from a file

Writing to a file

Writing to a file uses ofstream while reading uses ifstream

Remember to also have your << or >> the right way round depending on whether you are piping in or out.