aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Lab7/CST116F2021-Lab7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116F2021-Lab7/CST116F2021-Lab7.cpp')
-rw-r--r--CST116F2021-Lab7/CST116F2021-Lab7.cpp38
1 files changed, 2 insertions, 36 deletions
diff --git a/CST116F2021-Lab7/CST116F2021-Lab7.cpp b/CST116F2021-Lab7/CST116F2021-Lab7.cpp
index 72024a0..aef1f64 100644
--- a/CST116F2021-Lab7/CST116F2021-Lab7.cpp
+++ b/CST116F2021-Lab7/CST116F2021-Lab7.cpp
@@ -8,40 +8,6 @@
using namespace std;
-//From class: Substring finding code REMOVE BEFORE SENDING THIS IN
-/*
-#define ARRAY_SIZE 100
-
-int main()
-{
- string testArray[ARRAY_SIZE]{ "Test1", "Test2", "Hello all" };
- string subSring{ "ll" };
- int i = 0, j = 0, k = 0;
-
- while ((subSring[i] != testArray[2][j]) && (j < testArray[2].size()))
- {
- j++;
- }
- if (subSring[i] == testArray[2][j])
- {
- while ((subSring[i]) == testArray[2][j] && (i < subSring.size()) && (j < testArray[2].size()))
- {
- i++;
- j++;
- }
- }
- if (i == subSring.size())
- {
- cout << "Substring " << subSring << " was found,";
- }
- else
- {
- cout << "Substring " << subSring << " was not found,";
- }
- return (0);
-}
-*/
-
#define MAX_STRINGS 100
//Do not exceed 999; the output will become unevenly spaced
@@ -57,6 +23,8 @@ int main(void)
string strArray[MAX_STRINGS]{}, searchString{};
int occupiedPositions = 0, menuSelect = 1, searchTarget = 0;
+ cout << "String playground MK1" << endl;
+
while ((menuSelect >= 1) && (menuSelect <= 4))
{
menuSelect = menu(occupiedPositions);
@@ -107,8 +75,6 @@ int main(void)
}
}
- cout << endl << "Exiting" << endl;
-
return (0);
}