F.21 add loop increment in bad example (#2141)

to mimic the previous examples and avoid an infinite loop.
This commit is contained in:
Timm Knape
2023-10-12 21:41:49 +02:00
committed by GitHub
parent b6363bbf11
commit 4ad63d7d34

View File

@@ -3301,7 +3301,7 @@ To compare, if we passed out all values as return values, we would something lik
return {in, move(s)};
}
for (auto p = get_string(cin); p.first; ) {
for (auto p = get_string(cin); p.first; p.second = get_string(p.first).second) {
// do something with p.second
}