summaryrefslogtreecommitdiff
path: root/BlankConsoleLab
diff options
context:
space:
mode:
authorTrevor Bouchillon <[email protected]>2022-11-29 20:10:00 -0800
committerTrevor Bouchillon <[email protected]>2022-11-29 20:10:00 -0800
commit4a85993775a5c11c73bd7e139a44a33e98c96256 (patch)
treefcb00421dbc2fbb88d19da1654d1c0373912c16a /BlankConsoleLab
parentworking outputs (diff)
downloadcst116-lab3-daboochillin-4a85993775a5c11c73bd7e139a44a33e98c96256.tar.xz
cst116-lab3-daboochillin-4a85993775a5c11c73bd7e139a44a33e98c96256.zip
added user input for file loc
Diffstat (limited to 'BlankConsoleLab')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp
index b686577..bde5088 100644
--- a/BlankConsoleLab/BlankConsoleLab.cpp
+++ b/BlankConsoleLab/BlankConsoleLab.cpp
@@ -14,6 +14,7 @@ using std::ifstream;
using std::ofstream;
using std::left;
using std::setprecision;
+using std::string;
const int MAX = 100;
int ReadData(ifstream& inFile, int pick[], int drop[], int psgr[], float dist[], float fare[], float toll[]);
@@ -33,7 +34,10 @@ int main()
int record_counter(0);
ifstream inFile;
ofstream outFile("C:\\TEMP\\largeout.txt");
- inFile.open("C:\\TEMP\\large.txt");
+ string FileLoc;
+ cout << "Please enter the input file name including extension: ";
+ cin >> FileLoc;
+ inFile.open(FileLoc);
if (inFile.is_open())
{