logoalt Hacker News

zzzoom • today at 3:20 AM • 1 reply • view on HN

> And then "how should I iterate" is similarly the same as any other language? Either a for or a for-each loop?

for (ignoring do and while) and foreach loops, std::for_each, ranges for_each at the very least


Replies

kllrnohj • today at 3:24 AM

...which is the same as nearly every other language? What language doesn't have that same collection of stuff?

Java: for, for-each, do-while with iterator, list.forEach(..), list.stream().forEach(..), etc...

➕ show 1 reply