diff options
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/WordCollection.cpp | 2 |
diff --git a/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/WordCollection.cpp b/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/WordCollection.cpp index cd651b4..4cfdbb5 100644 --- a/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/WordCollection.cpp +++ b/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/WordCollection.cpp @@ -16,7 +16,7 @@ void WordCollection::copyFrom(const WordCollection& other) { words = new DynStr[length]; sortedPos = new int[length]; - for (int i = 0; i < length; i++) { // Must be < length, since we can have valid items outside the count range in words + for (int i = 0; i < length; i++) { // Must be < length, since storedWordsCount could be > count words[i] = other.words[i]; sortedPos[i] = other.sortedPos[i]; } |
