79103539

Date: 2024-10-18 20:20:10
Score: 1.5
Natty:
Report link

There is a new feature provided by upcoming C++23 - std::print and std::println from new header file print:

#include <print>
#include <ranges>
#include <vector>

int main() {
    using std::views::zip;

    auto arr1 {std::vector{1, 2, 3}};
    auto arr2 {std::vector{"azaza", "ololo", "igogo"}};

    for (auto [key, value] : zip(arr1, arr2)) {
        std::println("{}: {}", key, value);
    }
}
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Eagle