Remember: C and C++ are not Java. Arrays, for instance, are just a pointer to N pieces of memory. They are not Objects where you could store additional information, such as the size of the array. Thus, the compiler needs to know the size.
The reason isn't obvious for vectors. After all, you can use int * instead and then allocate whatever size you want.
But if you have a multi-dimensional array, it becomes more obvious why the compiler must know the size.
int myArray[3][3];
This is still just 9 ints of memory stored in the order of [0][0], [0][1], [0][2], [1][0] etc. So to get to myArray[2][1], the compiler knows to go to the 8th integer.
But here's a little more info on why it matters for 1-D arrays.
int myArray[10];
int myNextArray[5];
In this case, you have two pieces of memory, one that's 10 ints long and one that's 5 ints long. If the compiler doesn't know the size of them, how will it know how much space they each take, so it knows how to set up at the start of your method?
Or imagine this.
int size = 10;
int myArray[size];
size = 20;
How big is the array?
If you need dynamic arrays, use dynamic arrays.