aboutsummaryrefslogtreecommitdiff
path: root/lab8.txt
diff options
context:
space:
mode:
authorTyler Taormina <[email protected]>2021-11-23 16:07:20 -0800
committerTyler Taormina <[email protected]>2021-11-23 16:07:20 -0800
commitafc2a286cd75bd14ae5e540ce1dc8a00c77fe025 (patch)
tree4b5b36911f22d3d42330fab97cc0f9707e512fb3 /lab8.txt
parentAdding new files. (diff)
downloadcst115-lab8-till-t-afc2a286cd75bd14ae5e540ce1dc8a00c77fe025.tar.xz
cst115-lab8-till-t-afc2a286cd75bd14ae5e540ce1dc8a00c77fe025.zip
11.9 complete
Diffstat (limited to 'lab8.txt')
-rw-r--r--lab8.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/lab8.txt b/lab8.txt
index 4e14e2f..a8952ef 100644
--- a/lab8.txt
+++ b/lab8.txt
@@ -15,6 +15,30 @@ p 317
4 pts #5-6
Submit: Statements for 5, Judgements for 6
+5.
+ a.) .is_open()
+ b.)
+
+ int num_data = 0;
+
+ //open file
+ ifstream input ("lab8.txt");
+
+ // check open file
+ if (input.is_open())
+ {
+ // priming
+ input >> lname[num_data] >> id[num_data] >> age[num_data];
+ }
+ else
+ cout << "File not opened" << endl;
+ return 0;
+
+ c.)
+ for the above ^^
+ input.close()
+
+
================================================================================================