Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

c - Stray "303" and stray "215" in program -- why?

Instead of stray "302" in program for which I found here, I got the error message:

algo.c:118: error: stray ‘303’ in program
algo.c:118: error: stray ‘215’ in program

I could not seem to figure it out , what is this?

  • EDIT

For future reference, stray 'XXX' means an incomprehensible character to the compiler. The way to fix is to find the 'XXX' character (which now I find out is not always this unicode, it can't be a wrong definition, such as '##' in '##define'), then delete or correct it. Good luck!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

These are:

00C3    LATIN CAPITAL LETTER A WITH TILDE
        : 0041 0303
        U+00C3, character ??, decimal 195, hex 0xC3, octal 303, binary 11000011
        UTF-8: 0xc3 0x83

008D    <control>
        = REVERSE LINE FEED
        U+008D, character ?, decimal 141, hex 0x8D, octal 215, binary 10001101
        UTF-8: 0xc2 0x8d

I'm guessing those aren't there deliberately. Sometimes editing in a terminal can produce this if you start typing before the window has fully loaded and done its stty thing. I often see this sort of thing in emacs.

Solution: go to the appropriate lines and remove the characters. cat -te or less are useful for identifying which characters are problematic.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...