diff options
Diffstat (limited to 'BlankConsoleLab/cst116-lab3-wilson.cpp')
| -rw-r--r-- | BlankConsoleLab/cst116-lab3-wilson.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/BlankConsoleLab/cst116-lab3-wilson.cpp b/BlankConsoleLab/cst116-lab3-wilson.cpp index 5e8e066..a7630b0 100644 --- a/BlankConsoleLab/cst116-lab3-wilson.cpp +++ b/BlankConsoleLab/cst116-lab3-wilson.cpp @@ -40,23 +40,24 @@ int main() // Notice how this automatically opens the file - ofstream outFile("lab3_Report.txt"); + ofstream outFile; + outFile.open("C:\\TEMP1\\lab3_Report.txt"); char file = 'a'; cout << "Please choose a file to open. Press 's' for small.txt, or press 'l' for large.txt: "; cin >> file; cout << endl; - while (file != 's' && file != 'l'){ - switch (file) { - case 's': - inFile.open("small.txt"); - break; - case 'l': - inFile.open("large.txt"); - break; - } + switch (file) { + case 's': + inFile.open("C:\\TEMP1\\small.txt"); + break; + case 'l': + inFile.open("C:\\TEMP1\\large.txt"); + break; } + //inFile.open("C:\\TEMP1\\small.txt"); + if (inFile.is_open()) { record_counter = ReadData(inFile, outFile, pick, drop, psgr, dist, @@ -71,13 +72,13 @@ int main() } else { - cout << "Trouble Opening Input File"; + cout << "Trouble Opening Output File"; cout << "\n\n\t\t ** About to EXIT NOW! ** "; } } else { - cout << "Trouble Opening Output File"; + cout << "Trouble Opening Input File"; cout << "\n\n\t\t ** About to EXIT NOW! ** "; } return 0; |