![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
bwgames
Joined: 21 Jul 2005 Posts: 36
|
Pointer? issue (previous identifier must be a pointer) |
Posted: Wed Sep 05, 2007 4:47 am |
|
|
Using CCS 4.053.
*** Error 66 Line 251(51,52): Previous identifier must be a pointer
Code: | if((manualrx>0)&&(manualrx<4)) { rx_char[manualrx-1] = b0_char; manualrx++; } |
manualrx is a int, rx_char is defined as char rx_char[3]. b0_char is a char type.
The previous line is
Code: | if(b0_char=='$') manualrx = 1; |
51-52 relates to the manualrx-1, which to me, appears to be valid, as manualrx must be 1 to enter that if, and manualrx-1 is 0, which is a valid address.
Anyone have any ideas? Thanks ![Smile](images/smiles/icon_smile.gif) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Wed Sep 05, 2007 6:25 am |
|
|
To be used to access an array, rx_char, needs to be a char*, not a char (it automatically is this type, if the declaration is of an array). What is the actual declaration line, for 'rx_char'...
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
bwgames
Joined: 21 Jul 2005 Posts: 36
|
|
Posted: Wed Sep 05, 2007 7:15 am |
|
|
Ttelmah wrote: | To be used to access an array, rx_char, needs to be a char*, not a char (it automatically is this type, if the declaration is of an array). What is the actual declaration line, for 'rx_char'...
Best Wishes |
ahem uhm This is highly embarrassing.
I actually defined it as char rx_id, and I was using int rx_char elsewhere....
*crawls back in embarrassment*
This is what happens when you have dozens of variables :( |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|