summaryrefslogtreecommitdiff
path: root/BlankConsoleLab
diff options
context:
space:
mode:
authorhuntbyrne <[email protected]>2022-12-06 17:12:34 -0800
committerGitHub <[email protected]>2022-12-06 17:12:34 -0800
commitddc3922d30e1fb0eb971ba24a5fac8eccf1512d0 (patch)
treeca5a4989bea025757cb5649e86bcd789351ebfb7 /BlankConsoleLab
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-lab3-huntbyrne-ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0.tar.xz
cst116-lab3-huntbyrne-ddc3922d30e1fb0eb971ba24a5fac8eccf1512d0.zip
Update BlankConsoleLab.cpp
Diffstat (limited to 'BlankConsoleLab')
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp55
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;
+}