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
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to