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

I'm guessing you want the value represented by the string pointed to by usrID, and not 
the value of the pointer usrID. If that is the case take a look at StrAToI in the 
reference.

Regards,
Kristian Adrup



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