aboutsummaryrefslogtreecommitdiff
path: root/13a.txt
diff options
context:
space:
mode:
authorJacobAKnox <[email protected]>2021-11-13 09:49:09 -0800
committerJacobAKnox <[email protected]>2021-11-13 09:49:09 -0800
commitfcecfe178999fcf25cc7ad088913626f7f18f1fa (patch)
treef0a41368e63f3c0d808ee960a2daa5c71a044f31 /13a.txt
parentAdd online IDE url (diff)
downloadcst115-lab8-jacobaknox-master.tar.xz
cst115-lab8-jacobaknox-master.zip
13 completedHEADmaster
Diffstat (limited to '13a.txt')
-rw-r--r--13a.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/13a.txt b/13a.txt
new file mode 100644
index 0000000..ec94769
--- /dev/null
+++ b/13a.txt
@@ -0,0 +1,31 @@
+13a
+
+5.
+ int records = 0;
+ ifstream file = ("file.txt");
+
+ string lname[], id[], age[];
+
+ if (file.is_open())
+ {
+ file >> lname[records] >> id[records] >> age[records];
+ while (!file.eof())
+ {
+ records++;
+ file >> lname[records] >> id[records] >> age[records];
+ }
+ file.close();
+ }
+ else
+ {
+ //error handling
+ }
+
+ printData(lname, id, age, records);
+
+6.
+ a. False
+ b. True
+ c. True
+ d. True
+ e. True \ No newline at end of file