Confusing error


I’m working on the solution to this chapter, and I’ve got the right result with the following code:

NSString *myHost = [[NSHost currentHost] localizedName]; NSLog(myHost);

However, I first tried to do something along the lines of:

NSString *myHost = [[NSHost currentHost] localizedName]; NSLog(@"My computer's name is: %@", myHost);

The latter gives me several warnings and won’t run. I’m just trying to figure out what’s wrong with it so I won’t make the sake mistake again.


That looks pretty good to me. What is the text of the error?