Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我想将我的 nsstring 转换为 unsigned char 我尝试过使用闲置的代码行
unsigned char strTransforms[100] = (unsigned char) [newTransFarString UTF8String];
但它显示错误“数组初始化程序必须是初始化程序列表”
如何将其转换为无符号字符;谢谢
您是否尝试过 NSString 方法 – getCString:maxLength:encoding: ?