调试出现Function 'getch' shuld have a protype怎么处理

[复制链接]
查看11 | 回复3 | 2008-10-15 15:32:49 | 显示全部楼层 |阅读模式
我用TC做界面,编译时出现错误,描述为Function 'getch' shuld have a protype。具体程序为#include
#include
int main()
{
int gdriver, gmode;
gdriver=VGA;
gmode=VGAHI;
initgraph(&gdriver, &gmode, "f:\\tc");
bar3d(100, 100, 300, 250, 50, 1);/*画一长方体*/
getch();
closegraph();
}

回复

使用道具 举报

千问 | 2008-10-15 15:32:49 | 显示全部楼层
getch()函数的声明在conio.h文件中,所以要包含conio.h文件...
回复

使用道具 举报

千问 | 2008-10-15 15:32:49 | 显示全部楼层
#include 把这个加上。...
回复

使用道具 举报

千问 | 2008-10-15 15:32:49 | 显示全部楼层
用getchar();...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行