> From: Iehab AL Rassan
>
> I am using code warrior light and I am trying to use
> SysBatteryInfo function
> that shows the percentage of the remaining battery; unfortunately,
> percentage parameter is UInt8 and the compiler could not
> recognize this data
> type, it considers it as undefined data type. If I define the percentage
> parameter as UInt16 or int, it gives me compilation error :
> Error   : cannot convert
> 'unsigned short *' to
> 'unsigned char *'
> Program1.c line 569       NULL, NULL,percentP) ;
>

I don't have CW Lite, so I can't verify this myself, but it sounds like
UInt8 somehow didn't get defined in the CW Lite headers.  You can define it
yourself with:

typedef unsigned char   UInt8

The error message, "can't convert X to Y" means the compiler was expecting
type Y when it encountered type X.  So, you can see that your compiler
expects the percentP to be a pointer to an unsigned char, which is a pointer
to a UInt8 if it has been properly defined.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to