when I declared a global array
I assigned all its values -1 outside the main function
for (int i = 0; i < 5005; i++) color[i] = -1;
It gave me error.
But when i did this inside the main function it didn’t.
I am new to c++, please help.