You can't increment arrays. However, you can increment pointers so they progressively act on elements of an array.
For example;
Code:
#include <iostream>
int main()
{
int arr[] = {1, 2, 3, 4, 5};
int *p = arr;
int *end = arr + 5; // as we have 5 elements in array
while (p != end)
{
std::cout << *p << '\n';
++p;
}
}
will print the elements of your array, one per line.
Note that end points one past the last element of the array. That means it cannot be dereferenced, but it does provide a marker for ending the loop.