I did this but there was an error. I don't know how you can do this.
// open the infile
ifstream inFile;
inFile.open ("in6s17.txt");
//display error message
if (!inFile) {
cout << "Error opening infile." << endl;
}
//write to infile
else
{
for (int count=0; count<MONTHS; count++)
rainfallAmount[count];
}
//close the infile
inFile.close();
It keeps saying that there's an error opening infile.