What does the error : " Stray '\342' in program " mean??

Every time I copy and paste an instance method from the Xcode Documentation I get this error. After I retype the method (and delete the C&P line), the error vanishes.

I think that copying and pasting - which many books recommend, is a great idea, but in my case anyway, it copies other characters which cause this error.

All comments and suggestions are most welcome.

Thanks!

24" iMac, 17" i7 MacBook Pro, iPhone 4, Mac OS X (10.6.4)

Posted on Dec 23, 2010 3:42 PM

Reply
2 replies

Dec 23, 2010 7:14 PM in response to g_wolfman

Yeah, since my post I've been Googling and found that others have had the same problem copying and pasting from the Xcode doc's. So-ooo, you're probably spot-on in your comments.

This has happened to me way too many times, and after doing several 'test' copy/pastes I am convinced that this is the problem. Doing a c/p with a normal text editor would never reveal this issue. Doing so with a compiler would probably 'expose' the non-visible char's just as you mentioned. This is too bad as it does save a bit of typing.

Thanks for your post.

Happy Holidays,
Phillip

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What does the error : " Stray '\342' in program " mean??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.