|
HI
I have been trying to use arrays in Interactive C with the handybaord.
I have to read from analog inputs 0,1,2 and 3 of the handybaord and put
those values in an array.
so I had written:
int v0=analog(0);
int v1=analog(1);
int v2=analog(2);
int v3=analog(3);
int x[4];
int x[]= {v0,v1,v2,v3};
but when I try to download the file into HB, it gives me a syntax error
around the line in which I am assigning values to my array elements i.e. the
last line in the code above..if I change the last line to
int x{}= {1,2,3,4}; then it works fine...now that is kinda weird..that I
cannot assign variables as array elements??
Any help would be greatly appreciated..
Thanks
Sach
|
|
Message has 1 Reply:
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|