Compilation error Error:stray ' \343 ' in the program solution _c language

Source: Internet
Author: User

Problem:
Copy a piece of code from the net, paste into the program strcat_compare.c of oneself write, then compile Gcc-o strcat_compare strcat_compare.c;
The error occurs as follows:

Copy Code code as follows:

avid@ubuntu:~/wrk/tmp$ Gcc-o Strcat_compare strcat_compare.c
strcat_compare.c:in function ' main ':
Strcat_compare.c:28:1: Error:stray ' \343 ' in the program
Strcat_compare.c:28:1: Error:stray ' \200 ' in the program
Strcat_compare.c:28:1: Error:stray ' \200 ' in the program
Strcat_compare.c:28:1: Error:stray ' \343 ' in the program
Strcat_compare.c:28:1: Error:stray ' \200 ' in the program
Strcat_compare.c:28:1: Error:stray ' \200 ' in the program
Strcat_compare.c:30:1: Error:stray ' \343 ' in the program
Strcat_compare.c:30:1: Error:stray ' \200 ' in the program
Strcat_compare.c:30:1: Error:stray ' \200 ' in the program
Strcat_compare.c:30:1: Error:stray ' \343 ' in the program
Strcat_compare.c:30:1: Error:stray ' \200 ' in the program
Strcat_compare.c:30:1: Error:stray ' \200 ' in the program
Strcat_compare.c:32:1: Error:stray ' \343 ' in the program
Strcat_compare.c:32:1: Error:stray ' \200 ' in the program
Strcat_compare.c:32:1: Error:stray ' \200 ' in the program
Strcat_compare.c:32:1: Error:stray ' \343 ' in the program
Strcat_compare.c:32:1: Error:stray ' \200 ' in the program
Strcat_compare.c:32:1: Error:stray ' \200 ' in the program
david@ubuntu:~/wrk/tmp$

Operating environment: Ubuntu 11.10;
Solution:
1. Put the dog search, said that the program itself may have no problem with the grammar, but the error line contains unrecognized characters, such as the format of the space is not correct;
2. Delete the space in front of the error line in the program, reinsert the space or the TAB key, recompile, and the error disappears.
OK, problem solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.