diff options
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 |