I need to output one line with two calls to NSLog. I thought the code was:
int i = 0; NSLog(@"Number "); ... NSLog(@"%d", i); Will show:
Number 0
But he prints:
Number 0
NSLog inserts a new line automatically. How do I add the first call to NSLog?
I need to output one line with two calls to NSLog. I thought the code was:
int i = 0; NSLog(@"Number "); ... NSLog(@"%d", i); Will show:
Number 0
But he prints:
Number 0
NSLog inserts a new line automatically. How do I add the first call to NSLog?
This is not correct, use either a buffer or a printf- like function.
Maybe so, or I did not understand the question.
int i = 0; NSLog(@"Number %d", i); int i = 0; printf("Number "); printf("%d", i); Source: https://ru.stackoverflow.com/questions/268404/
All Articles