diff options
| author | huntbyrne <[email protected]> | 2022-12-06 17:12:34 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-06 17:12:34 -0800 |
| commit | ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0 (patch) | |
| tree | ca5a4989bea025757cb5649e86bcd789351ebfb7 /BlankConsoleLab | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-lab3-huntbyrne-ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0.tar.xz cst116-lab3-huntbyrne-ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0.zip | |
Update BlankConsoleLab.cpp
Diffstat (limited to 'BlankConsoleLab')
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 55 |
1 files changed, 49 insertions, 6 deletions
diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index ed5f807..92b1f7e 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -2,15 +2,58 @@ // #include <iostream> - -using namespace std; - -using std::cout; +#include <fstream> // For the files!!!! +#include <iomanip> // For manipulators & formatting options using std::cin; +using std::cout; using std::endl; +using std::setw; +using std::ios; -int main() +using std::ifstream; +using std::ofstream; + + +int size = 5; +int arr[50]; +int choice = 0; + + +void filechoice() { - cout << "Hello World!\n"; + cout << " Which record would you like to open? Small or Large? \n 1 is large, 2 is Small" << endl; + cin >> choice; } +void largetext() +{ + ifstream inFile; + + if (choice = 1) { + ofstream outFile("C:\\TEMP\\large.txt"); + + inFile.open("C:\\TEMP\\large.txt"); + } + +} + +void smalltext() +{ + ifstream inFile; + + if (choice = 2) { + ofstream outFile("C:\\TEMP\\small.txt"); + + inFile.open("C:\\TEMP\\small.txt"); + } + +} + + +int main() +{ + filechoice(); + largetext(); + smalltext(); + return 0; +} |