diff options
| author | prestonderek <[email protected]> | 2022-11-19 22:01:59 -0800 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-11-19 22:01:59 -0800 |
| commit | 60445ebe7f06238fbf2ce8ff39f3108844ddd59b (patch) | |
| tree | e0c2cc46e10af8adacd5496958d146fd8a8fcd2c /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Comments (diff) | |
| download | cst116-lab3-prestonderek-60445ebe7f06238fbf2ce8ff39f3108844ddd59b.tar.xz cst116-lab3-prestonderek-60445ebe7f06238fbf2ce8ff39f3108844ddd59b.zip | |
comments
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 565dd4e..faef9e8 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -114,6 +114,8 @@ int ReadData(ifstream& inFile, int pickup[], int dropoff[], int psgrs[], float d return counter; } +//The write output file function writes the information grabbed from the read data +//function to a new output file at the originally called location void WriteOutputFile(ofstream& outFile, int pickup[], int dropoff[], int psgrs[], float dist[], float fare[], float toll[], int counter) @@ -128,7 +130,7 @@ void WriteOutputFile(ofstream& outFile, int pickup[], int dropoff[], int outFile << endl; for (int r = 0; r <= counter - 1; r++) { - if (toll[r] == 0) + if (toll[r] == 0) //again, this is used for a cleaner looking output file. { outFile << setiosflags(ios::left) << setw(5) << pickup[r] << resetiosflags(ios::left) |