可能重复:
Format specifies type ‘unsigned short’ but the argument has type ‘int’的Xcode建议用%d来代替%C
我使用的NSString的Html类别在https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m
Xcode中给了我这个建议
我应该同意并替换它吗?
可能重复:
Format specifies type ‘unsigned short’ but the argument has type ‘int’的Xcode建议用%d来代替%C
我使用的NSString的Html类别在https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m
Xcode中给了我这个建议
我应该同意并替换它吗?
这将是更好的投各参数(字符),或使用UTF十六进制编码的字符,单引号之间。
但%C代表'unichar'又名'unsigned short'。 –
...并将0x2028转换为'char'? –
是的,可能应该是'unichar',而不是'char'。 –
将单个引号转换为'(char)'或将单引号之间的字符使用UTF十六进制编码会更好。 –
如果你想把这些值作为字符打印出来,那么不要,你应该改为'(无符号短符号)'。 – 2013-01-02 17:55:06
对不起,我错了你的问题和回答 –