Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / task5.cpp
diff options
context:
space:
mode:
1 files changed, 2 insertions, 2 deletions
-rw-r--r--Sem. 14/task5.cpp4
diff --git a/Sem. 14/task5.cpp b/Sem. 14/task5.cpp
index 5240d9a..4301cee 100644
--- a/Sem. 14/task5.cpp
+++ b/Sem. 14/task5.cpp
@@ -66,7 +66,7 @@ bool hasSameWords(const char* sentence1, const char* sentence2)
{
s1 += 1;
len1--;
- i = -1;
+ i = -1; // so it could become 0 for the next iteration
continue;
}
@@ -90,7 +90,7 @@ bool hasSameWords(const char* sentence1, const char* sentence2)
s1 += i;
len1 -= i;
- i = -1;
+ i = -1; // so it could become 0 for the next iteration
delete[] currentWord;
}