diff options
| author | Joe Traver <[email protected]> | 2022-11-28 16:42:03 -0800 |
|---|---|---|
| committer | Joe Traver <[email protected]> | 2022-11-28 16:42:03 -0800 |
| commit | fa48e3a280ea178e393f6dc6d18f7d55874bfdb6 (patch) | |
| tree | 1f34b83a5b9a56f6222aac625f2c25cd666cb2fa /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Final Formatting (diff) | |
| download | cst116-lab3-joetraver30-fa48e3a280ea178e393f6dc6d18f7d55874bfdb6.tar.xz cst116-lab3-joetraver30-fa48e3a280ea178e393f6dc6d18f7d55874bfdb6.zip | |
Fixed bug in ReadData logic. Program now accepts large test file
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 160c136..575743b 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -118,7 +118,7 @@ int ReadData(ifstream& inFile, int pick[], int drop[], int psgr[], float dist[], << setw(14) << CPM[counter] << resetiosflags(ios::left) << endl; counter++; - inFile >> pick[counter] >> drop[counter] >> psgr[counter] >> dist[counter] >> fare[counter] >> toll[counter] >> tfare[counter]; + inFile >> pick[counter] >> drop[counter] >> psgr[counter] >> dist[counter] >> fare[counter] >> toll[counter]; } return counter; @@ -178,7 +178,7 @@ void TotalPaid(ofstream& outFile, float tfare[], int counter, float &paid) } - cout << "\t\t\t\t\t\tTotal fairs paid: $" << paid << endl; + cout << fixed << setprecision(2) << "\t\t\t\t\t\tTotal fairs paid: $" << paid << endl; outFile << fixed << setprecision(2) << "\t\t\t\t\t\tTotal fairs paid: $" << paid << endl; } |