|
|
If you want to open a file
ifstream StreamName (file_specification);
ifstream InputData ("test.data");
For an output file:
ofstream StreamName (file_specification);
ofstream OutputData ("test.results");
To receive data you now simply replace cinby InputData
To output results, simply replace coutby OutputData
Once you have finished with input and output streams then close them with:
|
|
|