newbee question:can you initialise an array after it's declaration & if so how?
hi there the answer to this is prolly very obvious & i missed it but well asking anyway
i'd like to know why i can initialise an array like this:
Code:
int myarray[5][2]={0,0,0,0,0,0,0,0,0,0};
but doing so doesn't work:
Code:
int myarray[5][2];
myarray={0,0,0,0,0,0,0,0,0,0};
(with that code compilers just complain that there is a parsing error and a ; is expected before the {
is it only possible to initialise all members of the array when creating it or am i just making a syntax error? (initialising at start isn't possible in my case as the array is part of a struct & u compiler complains that i can't initialise variables there)
thanks in advance for any help