write to dynamic array : I created a dynamic array using pointers and successfully opened a text file to read the number of integers into an int pointer. Now I am trying to store the items from the text file sequentially into the array.

    *x = 0;
			do
			{
				file >> *temp;
				intArray[*x] = *temp;
				*x = *x + 1;
				cout << donationsArray[*x];

			} while (*x < *arraySize); 

The above uses cout to show me test output, which only produces a memory address. (the same memory address repeatedly for all the array positions)

    -842150451

What am I doing wrong here?