Dynamically resizing array lesson help c++ intermediate

hey! first time posting on here, super new to coding. i am doing the mosh lesson for resizing an array. taking an array of 5 and turning it into an array of 10 when needed. my issue, however is that my “array of 5” can hold 10 integers as is. i cannot see a difference between my code and moshes. as you can see, i have commented out the code for resizing the array, i dont want to resize until after i have limited the original size. i am at a loss here.

i also noticed, during the lesson video, after he made the array of 5, he tested it by entering the numbers 1- 5. he did not, however, do it again using 1-6. normally, he tests his code out to make sure it works then tests it again with a purposeful failure, but this time he did not push it to failure. so i am not sure if his code would limit the array to 5 either. i assume it would because he knows what he is doing and i do not, but assumptions are also dangerous.