aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2021-11-16 21:38:29 -0800
committer[email protected] <[email protected]>2021-11-16 21:38:29 -0800
commit4fd17c59c773df2ad91f1fd030541c4ffdd88ea9 (patch)
tree26ab19531e9287f79285c8c69d4f6674367330d3
parentLab 7 Answers (diff)
downloadcst116-lab7-rayyanansari03-4fd17c59c773df2ad91f1fd030541c4ffdd88ea9.tar.xz
cst116-lab7-rayyanansari03-4fd17c59c773df2ad91f1fd030541c4ffdd88ea9.zip
Lab7 Answer V2
-rw-r--r--CST116F2021-Lab7/CST116F2021-Lab7.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/CST116F2021-Lab7/CST116F2021-Lab7.cpp b/CST116F2021-Lab7/CST116F2021-Lab7.cpp
index f34c751..6293334 100644
--- a/CST116F2021-Lab7/CST116F2021-Lab7.cpp
+++ b/CST116F2021-Lab7/CST116F2021-Lab7.cpp
@@ -42,11 +42,11 @@ void findStringInArray(string u, string strArray[100], int arrayLen) {
for (int i = 0; i < arrayLen; i++) {
- for (int x = 0; x < strArray[i].length() - ulen; x++) {
+ for (int x = 0; x < strArray[i].length(); x++) {
- cout << strArray[i].substr(x, x + ulen) << "\n";
+ //cout << strArray[i].substr(x, x + ulen) << "\n";
- if (strArray[i].substr(x, x + ulen) == u.substr(0, ulen)) {
+ if (strArray[i].substr(x, ulen) == u.substr(0, ulen)) {