I've got a variable:
int Result = 42 % 84;
However its returning null开发者_开发知识库 on NSLog?
To NSLog an integer, use %d
.
int result = 42 % 84;
NSLog(@"%d", result);
int r=42%84;
NSLog(@"%d", r);
The above code logs 42 for me.
How does it return null in NSLog? Did you write "%@"?
精彩评论