How do I convert from int to unsigned short int - iPhone
10,768
I don't know objective-c but in plain C you can do something like
int value = 1234;
unsigned short sin_port = (unsigned short) value;
Author by
21zach2
I am an iPhone, Java, and HTML Programmer Currently working on iPhone Applications and Website for my Software and Website Development Company, Avicode
Updated on June 05, 2022Comments
-
21zach2 almost 2 years
I am trying to get an integer from a plist and use it with
sin_port
. Howeversin_port
requires anunsigned short
and not anint
how do I convert anint
to anunsigned short int
?