Friday, March 28, 2014

Class of March 28, 2014

     In today's class we begun chapter 6. It is about I/O streams. I/O refers to program input and output. Files for I/O are the same type of files used to store programs. As programmers, we should use files because they allow us to store data permanently which means that we do not have to input the same things every time we run the program and it makes life a whole lot easier and saves us time if the program requires a lot of input.

Defining input-file and output-file streams:
     #include <fstream>
     using namespace std;

Declaring input-file stream:
     ifstream     in_stream;

Declaring output-file streams:
     ofstream    out_stream;


No comments:

Post a Comment