Dynamic Array Error

I'm working on a program to practice dynamic arrays. What I'm trying to do is have the user input numbers to fill an array that will double in size when it gets full. When the current array is full, the filled array should be copied to a temporary array, then deleted. A new array with double the size of the previous is then created, and then the values of the temporary array should be copied to the newly created array. The temporary array is then deleted, and the process should be repeated until the user inputs -1. When the user inputs -1, the program should display all the the numbers recorded in the array.

I keep getting an error I believe because of this part of the code.
 
Problem Solved
Last edited on
closed account (48T7M4Gy)
It would help if you told us what the error is and what details/error messages are listed out.

the logic of lines 56 and 18 seem to be an unusual repetition and possibly lead to an out of range error which is not unknown in arrays.
Topic archived. No new replies allowed.