Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / task5.cpp
diff options
context:
space:
mode:
Commit72cfa91965af10ac60574a5ec471727927426b4f (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-01-10 03:29:19 -0500
Committer
 GitHub <noreply@github.com>
2021-01-10 03:29:19 -0500
Files26ea4b1f30176345203be6c894d739cf2b419944 /Sem. 14/task5.cpp
Introduction_to_programming_FMI-72cfa91965af10ac60574a5ec471727927426b4f.tar
Introduction_to_programming_FMI-72cfa91965af10ac60574a5ec471727927426b4f.tar.gz
Introduction_to_programming_FMI-72cfa91965af10ac60574a5ec471727927426b4f.zip
Parent838aabd23830835c4cbf8d6bce5db176636a74d6 (diff)
Update task5.cpp
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;
}