|
You are here |
www.reedbeta.com | ||
| | | | |
eyakubovich.github.io
|
|
| | | | | It's a simple task -- you want iterate over all the lines in a file and perform an action on each one. In Python it's as simple as:for line in open("somefile.txt"): print lineHow about C++11. How hard can it be? This stackoverflow post gives us a starting point. We... | |
| | | | |
gist.github.com
|
|
| | | | | C++ Ranges. GitHub Gist: instantly share code, notes, and snippets. | |
| | | | |
quuxplusone.github.io
|
|
| | | | | Via StackOverflow: Newcomers to C++20 Ranges are often surprised that some ranges cannot be "const-iterated." But it's true! template<std::ranges::range R> void foreach(const R& rg) { // Wrong! for (auto&& elt : rg) { } } | |
| | | | |
www.yodaiken.com
|
|
| | | |||