or ...
int a[5] = {0};
initializing during declaration ensures all elements are set to 0
Shikhar
On Thu, Jul 24, 2008 at 5:05 PM, Michael Schippling <[EMAIL PROTECTED]> wrote:
> I think it's usually like this when declaring a "global":
>
> int a[] = { 1,2,3,4,5,6,7 }
>
> If the variable already exists or is a local you need a for loop
> or other explicit assignment for each element.
>
> MS
>
>
> milos rovcanin wrote:
>> Ok,i would like to ask you one question: how to initialize an array???
>> I am using the GCC linux compiler.
>>
>> if i do it like this: a[1,1,1,1,1,1,1,1]
>> compiler says " parse error before ',' " i used to compile the same
>> program in Cygwin and there were no errors like this. Where is the problem?
>> Someone,please,help me!
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help