diff options
| author | prestonderek <[email protected]> | 2022-11-19 22:03:28 -0800 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-11-19 22:03:28 -0800 |
| commit | 82459429bd4e4534a94399e89aa28f9bee62ed0b (patch) | |
| tree | 5af95f1a11debf9c5f00bd3853465924a7aecb0c /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | comments (diff) | |
| download | cst116-lab3-prestonderek-82459429bd4e4534a94399e89aa28f9bee62ed0b.tar.xz cst116-lab3-prestonderek-82459429bd4e4534a94399e89aa28f9bee62ed0b.zip | |
Comments
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index faef9e8..21ce9eb 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -120,6 +120,7 @@ void WriteOutputFile(ofstream& outFile, int pickup[], int dropoff[], int psgrs[], float dist[], float fare[], float toll[], int counter) { + //This writes the headers in the output file before the data is written. outFile << " Here is the Output File" << endl; outFile << setw(5) << "Pickup: "; outFile << setw(10) << " Dropoff:"; @@ -128,6 +129,7 @@ void WriteOutputFile(ofstream& outFile, int pickup[], int dropoff[], int outFile << setw(12) << "Fare:"; outFile << setw(12) << "Tolls:"; outFile << endl; + for (int r = 0; r <= counter - 1; r++) { if (toll[r] == 0) //again, this is used for a cleaner looking output file. @@ -160,6 +162,7 @@ void WriteOutputFile(ofstream& outFile, int pickup[], int dropoff[], int << endl; } } + void PrintTotalsAndSummary(ofstream& outFile, int totalRecords) { // To screen |