手机
当前位置:查字典教程网 >编程开发 >C语言 >编译错误error: stray ‘343’in program的解决方法
编译错误error: stray ‘343’in program的解决方法
摘要:问题:从网上拷贝了一段代码,粘贴到自己写的程序strcat_compare.c中,然后编译gcc-ostrcat_comparestrcat...

问题:

从网上拷贝了一段代码,粘贴到自己写的程序strcat_compare.c中,然后编译gcc -o strcat_compare strcat_compare.c;

出现错误如下:

复制代码 代码如下:

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 program

strcat_compare.c:28:1: error: stray ‘200' in program

strcat_compare.c:28:1: error: stray ‘200' in program

strcat_compare.c:28:1: error: stray ‘343' in program

strcat_compare.c:28:1: error: stray ‘200' in program

strcat_compare.c:28:1: error: stray ‘200' in program

strcat_compare.c:30:1: error: stray ‘343' in program

strcat_compare.c:30:1: error: stray ‘200' in program

strcat_compare.c:30:1: error: stray ‘200' in program

strcat_compare.c:30:1: error: stray ‘343' in program

strcat_compare.c:30:1: error: stray ‘200' in program

strcat_compare.c:30:1: error: stray ‘200' in program

strcat_compare.c:32:1: error: stray ‘343' in program

strcat_compare.c:32:1: error: stray ‘200' in program

strcat_compare.c:32:1: error: stray ‘200' in program

strcat_compare.c:32:1: error: stray ‘343' in program

strcat_compare.c:32:1: error: stray ‘200' in program

strcat_compare.c:32:1: error: stray ‘200' in program

david@ubuntu:~/wrk/tmp$

运行环境:ubuntu 11.10;

解决办法:

1. 放狗搜,说可能程序本身的语法没有问题,但是,出错行中包含不被识别的字符,比如空格的格式不对;

2. 将程序中出错行前面的空格删除,重新插入空格或tab键,重新编译,错误消失。

ok,问题解决。

【编译错误error: stray ‘343’in program的解决方法】相关文章:

C语言中auto,register,static,const,volatile的区别详细解析

C++ 如何用cout输出hex,oct,dec的解决方法

求素数,用vector存储的实现方法

汇编语言rep movsd 的使用详解

C语言解线性方程的四种方法

文件编译时出现multiple definition of 'xxxxxx'的具体解决方法

VC6.0常见编译错误提示附解决方法

fatal error LNK1104: 无法打开文件“libc.lib”的解决方法

c语言 跳台阶问题的解决方法

去掉vs2010中ipch文件和.sdf文件的解决方法

精品推荐
分类导航