diff options
Diffstat (limited to 'CST116F2021-Lab7/CST116F2021-Lab7.cpp')
| -rw-r--r-- | CST116F2021-Lab7/CST116F2021-Lab7.cpp | 6 |
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)) { |