C语言
时间:2011-09-26
来源:互联网
这是神么状况 我用的11。04ubuntu和gcc4。6。1
编一个在屏幕上输出hello,world!的傻瓜程序段,就出错了
lichstonesking@lichstonesking-virtual-machine:~$ vi hello.c 开始编程
lichstonesking@lichstonesking-virtual-machine:~$ gcc -wall hello.c 程序省略了保证和教程上打的一模一样
gcc: unrecognized option '-wall'
hello.c: In function ‘main’:
hello.c:5:11: error: stray ‘\302’ in program
hello.c:5:11: error: stray ‘\250’ in program
hello.c:5:20: error: ‘hello’ undeclared (first use in this function)
hello.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
hello.c:5:26: error: ‘world’ undeclared (first use in this function)
hello.c:5:31: error: expected ‘)’ before ‘!’ token
hello.c:5:31: error: stray ‘\’ in program
hello.c:5:31: error: stray ‘\302’ in program
hello.c:5:31: error: stray ‘\250’ in program
lichstonesking@lichstonesking-virtual-machine:~$ ^C
lichstonesking@lichstonesking-virtual-machine:~$
编一个在屏幕上输出hello,world!的傻瓜程序段,就出错了
lichstonesking@lichstonesking-virtual-machine:~$ vi hello.c 开始编程
lichstonesking@lichstonesking-virtual-machine:~$ gcc -wall hello.c 程序省略了保证和教程上打的一模一样
gcc: unrecognized option '-wall'
hello.c: In function ‘main’:
hello.c:5:11: error: stray ‘\302’ in program
hello.c:5:11: error: stray ‘\250’ in program
hello.c:5:20: error: ‘hello’ undeclared (first use in this function)
hello.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
hello.c:5:26: error: ‘world’ undeclared (first use in this function)
hello.c:5:31: error: expected ‘)’ before ‘!’ token
hello.c:5:31: error: stray ‘\’ in program
hello.c:5:31: error: stray ‘\302’ in program
hello.c:5:31: error: stray ‘\250’ in program
lichstonesking@lichstonesking-virtual-machine:~$ ^C
lichstonesking@lichstonesking-virtual-machine:~$
作者: lichstonesking 发布时间: 2011-09-26
好吧,hello_world.c
代码:
#include <stdio.h>
int main() {
printf("Hello world!");
return 1;
}
int main() {
printf("Hello world!");
return 1;
}
作者: everyx 发布时间: 2011-09-26
代码: [ 下载 ] [ 隐藏 ]
使用 c 语法高亮
作者: 月下叹逍遥 发布时间: 2011-09-26
月下叹逍遥 写道:
代码: [ 下载 ] [ 隐藏 ]
使用 c 语法高亮
你暴露了,M$程序员。
代码: [ 下载 ] [ 隐藏 ]
使用 c 语法高亮
#include <stdio.h>
int main (void)
{
printf("hello world");
return 0;
}
int main (void)
{
printf("hello world");
return 0;
}
格式化 0.002 秒, 使用 GeSHi 1.0.8.4
LZ贴代码啊,不贴代码怎么知道什么错误。
作者: cuihao 发布时间: 2011-09-26
-wall 注意应该是-Wall w是大写的
作者: 飞火流星 发布时间: 2011-09-26
cuihao 写道:
月下叹逍遥 写道:
代码: [ 下载 ] [ 隐藏 ]
使用 c 语法高亮
你暴露了,M$程序员。
代码: [ 下载 ] [ 隐藏 ]
使用 c 语法高亮
#include <stdio.h>
int main (void)
{
printf("hello world");
return 0;
}
int main (void)
{
printf("hello world");
return 0;
}
格式化 0.002 秒, 使用 GeSHi 1.0.8.4
LZ贴代码啊,不贴代码怎么知道什么错误。
佛无南北,c无ml。。。
作者: 月下叹逍遥 发布时间: 2011-09-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28