From ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0 Mon Sep 17 00:00:00 2001 From: huntbyrne <114624182+huntbyrne@users.noreply.github.com> Date: Tue, 6 Dec 2022 17:12:34 -0800 Subject: Update BlankConsoleLab.cpp --- BlankConsoleLab/BlankConsoleLab.cpp | 55 +++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') 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 - -using namespace std; - -using std::cout; +#include // For the files!!!! +#include // 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; +} -- cgit v1.2.3