【发布时间】:2014-05-17 07:49:35
【问题描述】:
我面临的问题是,我无法将字符串或 int 转换为 UInt16。这是我当前的代码:(UInt16)[[defaults stringForKey:@"port"] intValue] [[defaults stringForKey:@"port"] intValue] 是 8080 和 (UInt16)[[defaults stringForKey:@"port"] intValue] 变成 51075 这是错误的。有人知道这样做吗?
感谢您的帮助!
【问题讨论】:
标签: string int converter uint16