declaring int 32 array -assigning values , problem
Posted: Sun Jan 21, 2007 6:33 pm
hello, Im new to c programming with PICs and im having a problem , maybe its simple.the code:
Code:
int32 const k[4];
k[0]=2253902;
k[1]=73593237;
k[2]=0;
k[3]=3;
on trying to assign alues to array k i get an 'expecting ( or ,' error
please advise.[/list]
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sun Jan 21, 2007 7:25 pm
Constant data is stored in ROM. You can't initialize a 'const' array at
runtime. You can only initialize it at compile time. This is done by
specifying the array elements in a list contained within braces.
See the following post for an example:
http://www.ccsinfo.com/forum/viewtopic.php?t=18391&start=6
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum