/********************************************************************************************
fileio.cpp
Jim Millard
for CO311
Using a file instead of the console
********************************************************************************************/
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void main()
{
ofstream fout("c:\\temp\\co311\\example.txt");
float input;
int i;
for (i = 0; i < 10 ; i++)
{
cout << "Enter a number: ";
cin >> input;
fout << input << endl;
}
ifstream fin("c:\\temp\\co311\\example.txt");
while (fin >> input)
cout << input << endl;
}