The document is a presentation on file handling in C++. It was presented by Waqar Ali to Sir Fasee Ullah on May 21, 2014 for a BSSE class. The presentation covers reading from and writing to files in C++ using ifstream and ofstream classes and functions, and includes code examples for opening, writing, reading, and closing files.
4. We need to know:
• how to "connect" file to program
• how to tell the program to read
data
• how to tell the program to write
data
5. (1) Header File : #include<fstream>
(2) Declaration
(3) Open the file
(4) Process the File
(5) Close the File
6. Classes:
ifstream (input only)
ofstream (output only)
Uses:
For Reading a file We use a function
“ ifstream ”
While for Writing on file we use a function
called “ ofstream ”