The error reads:
request for member \'begin\', \'end\' in \'arr\' which is non class type int[5], unable to deduce from expression error.
For a standard fixed-length C array, you can just write
int c_array[] = {1,3,5,7,9}, acc = 0; for (auto it : c_array) { acc += it; }
The compiler does the behind-the-scenes work, eliminating the need to create all those begin and end iterators.