If I have a static array, I can do something like that:
int a[] = {1, 2, 3};
for (const auto x: a) {printf("%d\n", x);}
Can I do something similar when I have a pointer (int* b) and array size (N)?
I'd rather avoid defining my own begin() and end() functions.
I'd also prefer not using std::for_each, but it's an option.