Oops sorry didn't realise it is unsigned char and char ... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alan Ingleby Sent: Friday, March 08, 2002 12:25 PM To: Palm Developer Forum Subject: Re: Unsigned char to a char *
<[EMAIL PROTECTED]> wrote in message news:78786@palm-dev-forum... > > How do you convert an unsigned char[40] to a char *? Thanks! > > unsigned char a[40]; // Keep in mind that this creates a buffer of 40 bytes, and sets a to be a POINTER to that buffer. char* b; // So both "b" and "a" are pointers. b = (char*)a; // This is called a "CAST" b is now pointing to the buffer created for a. (ie: they're both pointing to the same data). But Jim is right.... Go get a book on C. You'll learn a lot. Alan -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/