Changes in
bold:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream outfile;
outfile.open("myfile.txt");
cout << "Writing to the file: \n";
outfile << "Tom\n";
outfile << "Dick\n";
outfile << "Harry\n";
outfile.close();
return 0;
}
|
Last edited on
also it should be <fstream> without the i in it right?