Skip to content

Commit

Permalink
Merge pull request #6 from pmcgee69/patch-1
Browse files Browse the repository at this point in the history
Update main.cpp
  • Loading branch information
andreasfertig authored Sep 3, 2024
2 parents 3917d50 + faba821 commit e36b607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 02.04-coroutineLimitlessSequence0/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void UseCounterValue(int i);
IntGenerator // #A Returning a coroutine object
counter(int start, int end)
{
while(start < end) {
while(start <= end) {
co_yield start; // #B Yielding a value and giving control back to the caller
++start;
}
Expand All @@ -121,4 +121,4 @@ void UseCounterValue(int i)
int main()
{
UseCounter();
}
}

0 comments on commit e36b607

Please sign in to comment.