error: stray '\XXX' in program : Why?

后端 未结 4 983
旧时难觅i
旧时难觅i 2020-12-17 16:47

I\'m writing a little program in C++, and come across a strange error :

src/Makefile/Tool.cpp:42:3: error: stray ‘\\302’ in program
src/Makefile/Tool.cpp:42         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-17 17:33

    For me this problem came from copying my code over from a web browser.

    I tried doing a :%s/ / /g in vim to replace all spaces with real spaces but this has failed.

    I deleted the leading whitespace of all lines reporting this error and inserted the space characters again. This is labour intensive but appears to be the only solution I could find.

提交回复
热议问题