New Question. I end the output to one file (fout1) and try to start it to a new input and output file, using this code:
" fout1.close();
}
cout << endl << "Detailed employee reports have been printed in " << fileOutput1 << "." << endl << endl;
cout << "Enter input file name for company payroll report. (Can be same as first input file.): " << endl;
getline(fin, fileInput2);
fin.open(fileInput2.c_str());
if (fin.fail())
cout << "Bad input file." << endl << "Program stopped." << endl;
else
{
fin >> skill >> benefitType >> contPercent >> hours;
getline(fin, taxID);
getline(fin, name);
cout << "Enter output file name for company payroll report: ";
cin >> fileOutput2;
fout2.open(fileOutput2.c_str()) ;
cout << "Name \t \t Gross Salary \t Benefits \t Contributions \t Taxes \t Net Salary" << endl;
fout2 << "Name \t \t Gross Salary \t Benefits \t Contributions \t Taxes \t Net Salary" << endl;
while (!fin.eof()) "
But, when compiled, nothing shows up after the first output stream finishes. Where did I go wrong?