Seventh update on iterators - QUEUE
This commit is contained in:
1 parent
812d0240e3
commit
f956094178
6 files changed
+318
-41
No files matched your search
@@ -30,7 +30,7 @@ int main(int argc, char const *argv[])
|
||||
d_push_back_if(my_deque, i, i % 2 == 0);
|
||||
}
|
||||
|
||||
// Iterate from the start (index 0) to the end (index count - 1) of the deque
|
||||
// Iterate from the start (front index) to the end (rear index) of the deque
|
||||
for (deque_iter it = my_deque->it_start(my_deque); // Initialize iterator 'it' to the start of the deque
|
||||
!d_iter_end(&it); // Conditional stop (until it is not at the end)
|
||||
d_iter_next(&it)) // Iterator goes one position forward
|
||||
|
||||
Reference in new issue
Block a user