Hi,
I am having a problem with a small exercise program. The program works the first time through the loop but not the second. It faults on this line:
cin >> *(pint + i1);, with this error: pint <Unable to read memory>.
Further to @Kulkarnisr comment above; the variable MAX should be declared as a const int, it is common practice to use UPPER CASE variable names for variables that are const. In this instance MAX should be const anyway to avoid its value changing and introducing "issues".
The whole program as it stands is crying out for a refactor. Try breaking the problem down into smaller manageable functions that only do what their name implies and nothing more.