Comment Comment by HeavyStorm Given both Lua and python use a enumerator, the C++ example isn't really the correct equivalent. for (auto [i, v] : std::views::enumerate(vec)) { std::cout << i << ": " << v << '\n'; } This is how you'd do it. parent HeavyStorm 3 months ago