When C-free is used, mingw5 is used to compile C ++ code, and the first line of error is returned:
> 1: Error: stray '\ 239' in program
> 1: Error: stray '\ 187' in program
> 1: Error: stray '\ 191' in program
Baidu found that there may be Chinese characters (such as spaces and Chinese periods). This problem still exists after all the punctuation marks in the first line are replaced by the English input method. Http://gcc.gnu.org/ml/gcc-help/2005-01/msg00272.html there is a non-printable characters in a source file under this link. It is no wonder that the problem cannot be solved after replacement, and in essence this unprintable character is Bom character.
Usually our source files use GBK or UTF Encoding, if there are Chinese characters use GBK, UTF-8 is more conducive to cross-platform. In Windows, in order to distinguish the UTF-8 encoding format, write the Three-byte mark (0xef 0xbb 0xbf) before the UTF-8-encoded text file to distinguish the UTF-8-encoded text file, that is, the UTF-8 with Bom. Some compilers in Linux do not recognize Bom, so an error is reported.
For example, if GCC can be recognized, but mingw5 cannot, three errors are displayed.
Work und: Save As a file in UTF-8 no Bom format. If the cause of the error is the comma (,) of the Chinese character entered, you must modify it one by one.
More:
Character problems also occur in Python. The most typical problem is that tabs and spaces are mixed, while the python interpreter strictly requires only one type. Therefore, when using notpad ++, pay attention to relevant settings.
> 1: Error: stray '\ 239' in program> 1: Error: stray '\ 187' in program> 1: Error: stray '\ 191' in program