This isn't a Palm programming question, but a basic C one.

If I may be so presumptuous, my guess is you don't want to cast a Char *
to an Int16, but instead want to look into (here's the only Palm
specific
part of your question) StrAToI(), unless you're really trying to store a
pointer in your struct, in which case my guess is you'll soon be posting
here again.


-----Original Message-----
From: Paul Sulistio [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 4:19 PM
To: Palm Developer Forum
Subject: how to assign Char* to Int16


Does anyone know how to assign Char* to Int16?

this is my code:

tydef struct
{
  Int16 userID;
}User;
----------

Char* usrID;

user->userID =(...)usrID;

I tried using (Int16)usrID to cast usrID into Int16 but It didn't work I
got 
the wrong result. Any idea?

Thanks
-paul

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
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/

Reply via email to