Getting your book on the shelves of the Apple Corporate Store in Cupertino is sort of a Holy Grail for Mac dev writers. This pic was sent in by my buddy Scott:
That’s our iPhone book at the top, then my Learn C, and Scott and Mark Dalrymple’s excellent Learn Objective-C on the bottom. This pic means a lot to me. Cool!
I just received a comment from a reader about copying and pasting code from external sources, such as Pages or Word. Editing apps like Word and Pages can automatically modify your text, based on specific auto-format settings. For example, turning on smart-quotes changes this line of code:
printf (”Hello, world!” );
to this line:
printf ( “Hello, world! ” );
If you squint your eyes just so, you’ll see that the first line of code has standard straight quotes, and the second line replaces those quotes with curly quotes. The curly quotes are not legal ASCII characters and will cause the C/ObjC compiler to complain, sometimes incoherently.
If you find yourself with a line of code that you absolutely KNOW is legal code but just won’t compile, consider retyping the line in question.
A tip of the blogger cap to Colin Anderson. Thanks, Colin!