Mr. Mosh code is giving me a compilation error


In the Image, my code is identical to Mr. Mosh’s code in Course 2: Intermediate Pointers Lesson 10
but for some reason, I am getting a compilation error but Mr. Mosh isn’t
I’m confused because I’ve reread his code multiple times and it is the same as mine so I doubt that my code has been written differently so I need help.
His code:
while (true) {
court << "Number: ";
cin >> numbers[entries];
if (entries ==capacity) {
int* temp = new int[10];
for (int i = 0; i < entries; i++)
temp[i] = numbers[i];
delete numbers;
numbers = temp;
}
}

Compare those lines with your code.

That’s the thing, I have and it still doesn’t work.

Post the new code and error.