编译错误error: stray ‘343’in program的解决方法_C语言教程-查字典教程网
编译错误error: stray ‘343’in program的解决方法
编译错误error: stray ‘343’in program的解决方法
发布时间:2016-12-28 来源:查字典编辑
摘要:问题:从网上拷贝了一段代码,粘贴到自己写的程序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,问题解决。

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新C语言学习
    热门C语言学习
    编程开发子分类