I have a pointer array (ptrArr1) with two elements. I want the pointer array to be dynamically allocated. I can assign an address to the first element of the pointer array just fine, but I do not know how to assign an address to the second element of the pointer array. I do not wish to use any STLs or other precoded functions. I'm am doing this exercise to enhance my understanding of pointers. Thank you.
int main()
{
int one = 1;
int two = 2;
int *ptrArr1 = new int[2];
ptrArr1 = &one;
ptrArr1[1] = &two; //does not work
ptrArr1 + 1 = &two; // does not work
delete[]ptrArr1;
return 0;
}