From 6f1601b357865b36861c4a939118993a00449b9a Mon Sep 17 00:00:00 2001 From: Abdullah Havaldar Date: Tue, 29 Nov 2022 17:50:51 -0800 Subject: comments about reading file --- BlankConsoleLab/CST116-Lab3-Havaldar.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v1.2.3