I have arranged this code in many different ways. I can't seem to make it simply print the array. I have read alot about pointers and arrays, but the explanations are scetchy at best. What exactly are the rules for properly pointing to an array?
#include <iostream>
using namespace std;
int main() {
int a[5] = {1,2,3,4,5};
int *aptr = &a[0];
for(int i = 0; i <= 5; i++)
cout << (*aptr + 1);
system("pause");
return 0;
}