sanjay
Full Member level 1
Hi all,
I jsut wanted to ask this question..
When I declare an array using example like
int arraySize = 5
int array[arraySize] = { ......};
and compile it under ADS1.2 software I dont get any errors but when I try the same thing under ARm SDT evaluation software
it gives an error...
Can anyone help as to why is this so..
or is there any other way in which I can implement the above example without ERRORS in ARM SDT.
basically need something like "int arraySize" that gets the size of the array and then use it in the array declaration... as mention above
I even tried using const keyword but nothing helped..
If I go the pointers route.. how can I implement it..
like say if I have an array . int array[] = {3 , 4 , 5 , 6 , 7};
I know one can step through the array but how can then one detect the end of the array..
Help would be appreciated...
Thanks
I jsut wanted to ask this question..
When I declare an array using example like
int arraySize = 5
int array[arraySize] = { ......};
and compile it under ADS1.2 software I dont get any errors but when I try the same thing under ARm SDT evaluation software
it gives an error...
Can anyone help as to why is this so..
or is there any other way in which I can implement the above example without ERRORS in ARM SDT.
basically need something like "int arraySize" that gets the size of the array and then use it in the array declaration... as mention above
I even tried using const keyword but nothing helped..
If I go the pointers route.. how can I implement it..
like say if I have an array . int array[] = {3 , 4 , 5 , 6 , 7};
I know one can step through the array but how can then one detect the end of the array..
Help would be appreciated...
Thanks