aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp')
-rw-r--r--CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
index b758ea2..71d06c9 100644
--- a/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
+++ b/CST116-Ch5-Debugging/CST116-Ch5-Debugging.cpp
@@ -6,6 +6,7 @@
#include <string>
#include <list>
#include <bitset>
+#include <vector>
using namespace std;
using std::cout;
using std::cin;
@@ -30,20 +31,31 @@ int main()
string i3;
string i4;
- for (int i = 0; i < 4; i++) {
+ vector<string> n;
+ vector<string> g;
+ vector<string> c;
+
+
+ for (int i = 0; i < 4; i++) {
cout << "enter a name" << endl;
cin >> n1;
+ n.push_back(n1);
cout << "enter a gpa" << endl;
cin >> g1;
+ g.push_back(g1);
cout << "enter an income" << endl;
cin >> i1;
+ c.push_back(i1);
}
-
+ for (string i : n) {
+ cout << i << ' ';
+ }
+
return 0;