| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 5395 人关注过本帖
标题:‘conio.h': No such file or directory
只看楼主 加入收藏
Jays编程
Rank: 1
来 自:上海
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-10-11
结帖率:0
收藏
已结贴  问题点数:20 回复次数:4 
‘conio.h': No such file or directory
我编了个程序,有一个错误,说是‘conio.h': No such file or directory,不知道怎么修改,求高手帮忙。
#include<stdio.h>
#include<conio.h>
main()
{
    int a,b,c,d,max;
    printf("Please input a,b,c,d=?\n");
    scanf("%d,%d,%d,%d",&a,&b,&c,&d);
    max=a>b?a:b;
    max=max>c?max:c;
    max=max>d?max:d;
    printf("max=%d\n",max);
    getch();
    return 0;
}
搜索更多相关主题的帖子: directory conio file 
2010-10-11 20:09
Jays编程
Rank: 1
来 自:上海
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-10-11
收藏
得分:0 
补充:且达不到预想的结果
2010-10-11 20:22
someday
Rank: 3Rank: 3
来 自:保定
等 级:论坛游侠
帖 子:83
专家分:116
注 册:2010-10-8
收藏
得分:6 
#include<stdio.h>
#include<conio.h>
main()
{
    int a,b,c,d,max;
    printf("Please input a,b,c,d=?\n");
    scanf("%d%d%d%d",&a,&b,&c,&d);
    max=(a>b)?a:b;
    max=(max>c)?max:c;
    max=(max>d)?max:d;
    printf("max=%d\n",max);
    return 0;
}
这应该就对了吧
2010-10-11 20:44
m21wo
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:4
帖 子:440
专家分:1905
注 册:2010-9-23
收藏
得分:6 

你的程序主函数要有返回值,其余没错啊!只是你的输入要注意点 ,要这么输:5,2,42,3  这逗号一定要写!!!


我帮你改下:
#include<stdio.h>
#include<conio.h>
 int main()
{
    int a,b,c,d,max;
    printf("Please input a,b,c,d=?\n");
    scanf("%d%d%d%d",&a,&b,&c,&d);
    max=a>b?a:b;
    max=max>c?max:c;
    max=max>d?max:d;
    printf("max=%d\n",max);
    getch();
    return 0;
}
这时输入的时候就可以 这么输  2 56 3 1

If You Want Something, Go Get It, Period.
2010-10-11 20:52
帝国
Rank: 3Rank: 3
来 自:云南昆明
等 级:论坛游侠
帖 子:68
专家分:144
注 册:2010-10-11
收藏
得分:6 
我想是你的编译器问题,有部分编译器无法很好的连接 conio.h库,原因是conio库中不是所有的定义都在.h文件中,你可以尝试在#include<conio.h>语句下面加入一条#include<conio.c>,试一试。
2010-10-11 22:13
快速回复:‘conio.h': No such file or directory
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012166 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved