On Fri, 4 Feb 2000, Richard Burmeister wrote:
> From: <[EMAIL PROTECTED]>
> > Anyone can tell me the difference between : CharPtr X and char X[10]?
> 
> If you meant "What is the difference between CharPtr X and Char X[10]" (note
> caps) then this is just a basic C question.  The difference is that when you
> declare Char X[10] you are allocating space for 10 Chars, with X being a
> pointer to those chars, but when you declare CharPtr X you are only
> allocating space for the pointer X.
[..]

Also note that you should be using the Capitalized version of Char.  This
is a portable type, and ensures that you are getting the "right" type of
char (it could be signed or unsigned, etc..).  The Palm header files
define Char to be exactly what it expects a char to be.  The lower case
version can presumably vary between compilers.

-- 
Brian Mathis
Direct Edge
http://www.directedge.com


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to