| 网站首页 | JAVA文章 | AppServers | Web开发 | 应用开发 | 资源下载 | 论坛
    想学好编程,学好外语很重要  [enadd  2006年12月25日]        
设为首页 加入收藏 联系站长
您现在的位置: 编程笔记网 >> 应用开发 >> CC++ >> 文章正文
怎么这个程序不能通过?        【字体:
怎么这个程序不能通过?
作者:-    文章来源:互联网    点击数:    更新时间:2006-4-26


[root@localhost c]# cat switch_case
main()
{
unsigned short x;
char c;
scanf("%d,$c",&x,&c);
switch (c)
{
case 'D': printf("%dD\n",x);
break;
case 'O': printf("%oO\n",x);
break;
case 'X': printf("$xX\n",x);
break;
default : printf("input error\n !");
}
}

[root@localhost c]# gcc --version
gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@localhost c]# gcc switch_case
/usr/bin/ld:switch_case: file format not recognized; treating as linker script
/usr/bin/ld:switch_case:1: parse error
collect2: ld returned 1 exit status
[root@localhost c]#

help me!!
thanks i!!!

我懂了。原来源程序名要有.c的。


文章录入:enadd    责任编辑:enadd 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
  • 学习笔记——boot

  • 编写另一个printf

  • 使用cppunit为c++工程做单元…

  • 在Linux下如何快速搭建安全的…

  • C语言笔记

  • 请问外部变量和内部变量是什…

  • 缺少gets函数,怎么办?

  • 请问cache 和buff的意思?

  • 一个很莱的C程序

  • 扬声器

  •   网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 管理登录 |