• Search
  • Topics
  • Nodes
< back

#dailybiteofcpp

1 7 Toot LinkedIn
A chart of hourly posts over the last week (for big screens). A chart of hourly posts over the last week (for small screens).

1

From compiler-explorer.com

Compiler Explorer - C++

1 1

struct Point { int x; int y; }; int main() { auto dir = {-1,0,1}; Point p{5,5}; // Cartesian product representing the 3x3 grid around a center point. for (auto [x, y] : std::views::cartesian_product(dir, dir)) { auto v = Point{p.x+x, p.y+y}; // Iterate...

#cpp #coding #cplusplus #programming #dailybiteofcpp

16h ago

Showing first 1 out of 1