Stray /377 in xcode

I'm using xcode to do some c++ programming and all of a sudden I am receiving a "Stray /377 in program error"

I think is possibly because I recently started using a non apple wireless keyboard and I possibly put in some kind of weird key combination that created a non visible key.

I tried changing the encoding of the .cpp file to utf 8 but then when I reopen the file in xcode it comes out in chinese?

My project is very large so its not feasible to post the code for the project.

I'm using xcode 3.2.6 on osx 10.6.8

I tried opening the project in xcode 3.1.6 and got the same error.


"377" is octal for "255", or an 8-bit "-1".

Do you have one of those anywhere?

I believe XCode has a hex editor: just look for "0xff" somewhere in your recent source changes.

Octal 377 is decimal 255. It has no meaning in UTF-8, means a "latin small letter y with diaeresis" in ISO-8859-1. I think its presence in the file is probably a sign that it does not belong and can be removed without further consequences. If you agree, you can try removing all them in your entire tree like this:

find . -name '*.cpp' -exec sed -i~ 's/\o377//g' {} \;

The -i~ asks sed to make a backup copy of the files that it changes, in case you need the originals back -- or want to compare the changes with diff(1).

Need Your Help

mongodb query using 2 $near operator. Find users near start and destination location

mongodb mongodb-query geospatial

I have a problem where I need to locate users at a source and aggregate them according to their destination locations. I tried using multiple $near queries as listed below:

Authorizing with oAuth, posting to Twitter

php curl twitter twitter-oauth

I've created a Twitter Application to auto-post to my Twitter account. So, I don't need to authorize new users.