Declare and open input file stream fileIn and output file stream fileOut. Attach these to files named input.dat and output.dat. Write #include directives for any required header files. Make certain names from namespaces are accessible.

What will be an ideal response?

```
#include
. . .
ifstream fileIn;
ofsream fileOut;
fileIn.open(“input.dat”);
fileOut.open(“output.dat”);
```

The first definition defines fileIn to be the required input file stream, the second defines fileOut to be the required output file strream. The next two calls the open member function attaches the file streams to the file names in the quoted argument. This makes fileIn refer to input.dat and fileOut refer to output.dat.

Computer Science & Information Technology

You might also like to view...

The smallest element used in the composition of an image is called a(n):

A) pixel B) frame C) tag D) bitmap

Computer Science & Information Technology

The intersection of a row and column in a table is called a(n) ________

A) cell B) member C) element D) container

Computer Science & Information Technology