机械传动类型:[求助]一个C源程序的出现错误,大家帮帮我,在此先谢谢了!

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 20:16:05
#include <dos.h> /*dos接口函数*/
#include <math.h> /*数学函数的定义*/
#include <conio.h> /*屏幕控制函数*/
#include <stdio.h> /*i/o函数*/
#include <stdlib.h> /*库函数*/
#include <stdarg.h> /*变量长度参数表*/
#include <graphics.h>/*图形函数*/
#include <string.h>/*字符串函数*/
#include <ctype.h>/*字符操作函数*/
#define up ox48/*光标上移键*/
#define down ox50/*光标下移键*/
#define left ox4b/*光标左移键*/
#define right ox4d/*光标右移键*/
#define enter ox0d/*回车键*/
void *rar;/*全局变量,保存光标图像*/
struct palettetype palette;/*使用调色板信息*/
int graphdriver;/*图像设备驱动*/
int graphmode;/*图形模式值*/
int errorcode;/*错误代码*/
int maxcolors;/*可用颜色的最大数值*/
int maxx,maxy;/*屏幕的最大分辨率*/
double aspectratio;/*屏幕的像素比*/
void drawboder(void);/*画边框*/
void initialize(void);/*初始化*/
void computer(void);/*计算函数*/
void changetextstyle(int font,int direction,int xharsize);/*改变文本样式函数*/
void mwindow(char*header);/*窗口函数*/
int specialkey(void);/*获取特殊键函数*/
int arrow();/*设置箭头光标函数*/
int main()/*主函数*/
{
initialize();/*设置系统进入图形模式*/
computer();/*运行计算器*/
closegraph();/*系统关闭图形模式返回文本模式*/
return(0);/*程序结束*/
}
void initialize(void)/*设置系统进入图形模式*/
{
int xasp,yasp;/*用于读x和y方向的纵横比*/
graphdriver=detect;/*自动检测显示器*/
initgraph(&graphdriver,&graphmode,"");/*初始化图形系统*/
errorcode=graphresult();/*读初始化信息*/
if(errorcode!=grok)/*判断初始化是否出现错误*/
{
printf("graphics system error:%s\n",grapherrormsg(errorcode));/*显示错误代码*/
exit(1);/*退出*/
}
getpalette(&palette);/*读面板信息*/
maxcolors=getmaxcoler()+1;/*读颜色的最大值*/
maxx=getmaxx();/*读屏幕的尺寸*/
maxy=getmaxy();/*读屏幕的尺寸*/

说实话,看了半天,只发现,少了个大括号.