What does {-1,...} mean?
#1

Hey

I've looked through some threads and noticed that a lot of people use
Код:
new Var[MAX_PLAYERS] = {-1,...};
or sth. like this.
Why dont they use
Код:
new Var[MAX_PLAYERS] = -1;
?
Is the reason that only one element of the array gets the value -1?

-Greetz
Reply
#2

using "-1" sets only the first element to -1 however "-1, ..." sets all elements to -1.
Reply
#3

Alright. Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)