arr++ is attempting to increment the array. You can't do that.
The fact that the name of an array can be used like a pointer
to access an array does not mean that the name of the array is
a pointer. It "decays" - is translated into by the compiler - a
pointer, in some contexts.
You appear to be struggling with the concepts of arrays and pointers, as
used in the C language (and inherited by C++). I strongly suggest that
you spend as much time as needed to study the available tutorials and
documentation on pointers and arrays, Otherwise you will be coming back
to these forums repeatedly asking why your code doesn't work as expected.
A TUTORIAL ON POINTERS AND ARRAYS IN C
Relationship Between Arrays and Pointers
6.8 — Pointers and arrays
Exceptions to array decaying into a pointer?
Pointer to an Array in C
6. Arrays and Pointers
comp.lang.c FAQ list · Question 6.12
comp.lang.c FAQ list · Question 6.13