Reputation: 496
And also, why is it not necessary for, eg:
printf ("abc")
Upvotes: 2
Views: 521
Reputation: 128
UPDATE:
NSLog(@"%@",dictionary)
Tells the compiler that i got string to fulfill the requirement of string argument.
Update: Sorry I was supposed to write the "NSLog" instead of printf. my mistake!
Upvotes: 2
Reputation: 16946
NSLog
takes an NSString
as argument. @"abc"
denotes an NSString
because of the @ sign, so that is a valid argument for NSLog
. printf
is a normal C function that takes a C string, which is simply created using "".
Upvotes: 9
Reputation: 496
Because it requires NSString. Adding @declares value as type of NSObject (simplification).
Upvotes: 1