diff options
| author | Abdullah Havaldar <[email protected]> | 2022-11-29 17:50:51 -0800 |
|---|---|---|
| committer | Abdullah Havaldar <[email protected]> | 2022-11-29 17:50:51 -0800 |
| commit | 6f1601b357865b36861c4a939118993a00449b9a (patch) | |
| tree | 3f682be7ae7f76f85ad1d9b842a5d365202de6c9 | |
| parent | main comments (diff) | |
| download | cst116-lab3-abd00l4h-6f1601b357865b36861c4a939118993a00449b9a.tar.xz cst116-lab3-abd00l4h-6f1601b357865b36861c4a939118993a00449b9a.zip | |
comments about reading file
| -rw-r--r-- | BlankConsoleLab/CST116-Lab3-Havaldar.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp index a9d3c97..3833d43 100644 --- a/BlankConsoleLab/CST116-Lab3-Havaldar.cpp +++ b/BlankConsoleLab/CST116-Lab3-Havaldar.cpp @@ -24,8 +24,10 @@ int main() cout << "Please enter the input file name including extension: "; cin >> fileName; + //opening the file ifstream theFile(fileName); + //variables within the opened file int count = 1; int pick; int drop; @@ -34,6 +36,7 @@ int main() double fare; double toll; + //variables which are to calculate double avg = 0; int totalPpl = 0; double totalCost = 0; |