diff options
| author | prestonderek <[email protected]> | 2022-11-19 22:00:22 -0800 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-11-19 22:00:22 -0800 |
| commit | 10f12c3aa208f5dbcdf09d8507bda832b4b9d408 (patch) | |
| tree | 4a2798169a32726467ddffa51d9bc5bf82c24c66 /BlankConsoleLab/BlankConsoleLab.cpp | |
| parent | Commit for bigger file testing (diff) | |
| download | cst116-lab3-prestonderek-10f12c3aa208f5dbcdf09d8507bda832b4b9d408.tar.xz cst116-lab3-prestonderek-10f12c3aa208f5dbcdf09d8507bda832b4b9d408.zip | |
Comments
Diffstat (limited to 'BlankConsoleLab/BlankConsoleLab.cpp')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 1de2b3d..565dd4e 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -62,7 +62,8 @@ int main() } return 0; } -int ReadData(ifstream& inFile, int pickup[], int dropoff[], int psgrs[], float dist[], float fare[], float toll[]) +//Read data function grabs the data from the file and adds each data type to its own array +int ReadData(ifstream& inFile, int pickup[], int dropoff[], int psgrs[], float dist[], float fare[], float toll[]) { int counter = 0; inFile >> pickup[counter] >> dropoff[counter] >> psgrs[counter] >> @@ -78,7 +79,7 @@ int ReadData(ifstream& inFile, int pickup[], int dropoff[], int psgrs[], float d while (!inFile.eof()) { - if (toll[counter] == 0) + if (toll[counter] == 0) //This was added for a cleaner reading output. It replaces the toll if 0 with 'N/A' { cout << setiosflags(ios::left) << setw(5) << pickup[counter] << resetiosflags(ios::left) |