summaryrefslogtreecommitdiff
path: root/BlankConsoleLab/BlankConsoleLab.cpp
diff options
context:
space:
mode:
authorprestonderek <[email protected]>2022-11-19 22:03:28 -0800
committerprestonderek <[email protected]>2022-11-19 22:03:28 -0800
commit82459429bd4e4534a94399e89aa28f9bee62ed0b (patch)
tree5af95f1a11debf9c5f00bd3853465924a7aecb0c /BlankConsoleLab/BlankConsoleLab.cpp
parentcomments (diff)
downloadcst116-lab3-prestonderek-82459429bd4e4534a94399e89aa28f9bee62ed0b.tar.xz
cst116-lab3-prestonderek-82459429bd4e4534a94399e89aa28f9bee62ed0b.zip
Comments
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp3
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