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