这是我遇到的一个小问题,虽然它看起来很简单,但我找不到它,这里是代码:
int main (int argc, const char * argv[]) {
unsigned long long ep = 2292674165ul;
unsigned long long ep2 = 2487148347ul;
NSLog(@"%u", ep );
NSLog(@"%u", ep2);
NSLog(@"%u %u", ep , ep2);
// a last try..
NSLog(@"%@",[NSString stringWithFormat:@"%u %u", ep , ep2]);
}
它的输出:
2013-02-14 13:26:15.968 FTPTests[5274:1307] 2292674165
2013-02-14 13:26:15.970 FTPTests[5274:1307] 2487148347
2013-02-14 13:26:15.971 FTPTests[5274:1307] 2292674165 0
2013-02-14 13:26:15.972 FTPTests[5274:1307] 2292674165 0
有人能告诉我为什么第二个说明符打印 0 吗?我该如何解决?
谢谢!