鱼C论坛

 找回密码
 立即注册
查看: 3155|回复: 4

求解!

[复制链接]
发表于 2011-4-10 23:17:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 soldier 于 2011-4-23 10:05 编辑

#include "graphics.h"
#include "stdio.h"
#include "stdlib.h"
#include "conio.h"
#include <dos.h>

void main()
{
        void *w;
        int  i,b;
         int driver=DETECT,gmode;
        initgraph(&driver,&gmode," ");
        cleardevice();
        setbkcolor(9);
        setcolor(1);
    rectangle(500,200,560,202);\*顶部矩形*\         
        rectangle(500,202,560,220);\*中间矩形*\
        rectangle(500,202,520,220);
    rectangle(520,202,540,220);
        rectangle(540,202,560,220);\*中间小矩形*\
    line(500,200,480,220);
        rectangle(480,220,560,250);\*下面的大矩形*\
        circle(510,250,5);
        circle(540,250,5);\*轮子*\
    line((501,221,503,221);
        line(503,221,503,223);
        line(503,223,505,223);
        line(505,223,505,225);
        line(505,225,503,225);
        line(503,225,503,227);
        line(503,227,501,227);
        line(501,227,501,225);
        line(501,225,501,223);
        line(501,223,409,223);
        line(409,223,409,221);
        line(409,221,501,221);\*十字架*\
        rectangle(510,198,514,200);
        arc(512,198,0,180,2);\*警灯*\
        line(510,196,510,192);
        line(505,197,502,193);
        line(515,197,518,193);
        w= malloc(imagesize(490,190,600,300));
        getimage(490,190,600,300,w);
        for(i=490;i>0;i--)
        {
                putimage(i-1,190,w,COPY_PUT);
                line(2,250,630,250);
                delay(20);
        }
        getch();
        closegraph();
}


出现以下错误:
car1.c
E:\work1\car1.c(16) : error C2017: illegal escape sequence
E:\work1\car1.c(16) : error C2018: unknown character '0xb6'
E:\work1\car1.c(16) : error C2018: unknown character '0xa5'
E:\work1\car1.c(16) : error C2018: unknown character '0xb2'
E:\work1\car1.c(16) : error C2018: unknown character '0xbf'
E:\work1\car1.c(16) : error C2018: unknown character '0xbe'
E:\work1\car1.c(16) : error C2018: unknown character '0xd8'
E:\work1\car1.c(16) : error C2018: unknown character '0xd0'
E:\work1\car1.c(16) : error C2018: unknown character '0xce'
E:\work1\car1.c(16) : error C2017: illegal escape sequence
E:\work1\car1.c(17) : error C2100: illegal indirection
E:\work1\car1.c(17) : error C2100: illegal indirection
E:\work1\car1.c(17) : error C2017: illegal escape sequence
E:\work1\car1.c(17) : error C2018: unknown character '0xd6'
E:\work1\car1.c(17) : error C2018: unknown character '0xd0'
E:\work1\car1.c(17) : error C2018: unknown character '0xbc'
E:\work1\car1.c(17) : error C2018: unknown character '0xe4'
E:\work1\car1.c(17) : error C2018: unknown character '0xbe'
E:\work1\car1.c(17) : error C2018: unknown character '0xd8'
E:\work1\car1.c(17) : error C2018: unknown character '0xd0'
E:\work1\car1.c(17) : error C2018: unknown character '0xce'
E:\work1\car1.c(18) : error C2100: illegal indirection
E:\work1\car1.c(18) : error C2100: illegal indirection
E:\work1\car1.c(20) : error C2017: illegal escape sequence
E:\work1\car1.c(20) : error C2018: unknown character '0xd6'
E:\work1\car1.c(20) : error C2018: unknown character '0xd0'
E:\work1\car1.c(20) : error C2018: unknown character '0xbc'
E:\work1\car1.c(20) : error C2018: unknown character '0xe4'
E:\work1\car1.c(20) : error C2018: unknown character '0xd0'
E:\work1\car1.c(20) : error C2018: unknown character '0xa1'
E:\work1\car1.c(20) : error C2018: unknown character '0xbe'
E:\work1\car1.c(20) : error C2018: unknown character '0xd8'
E:\work1\car1.c(20) : error C2018: unknown character '0xd0'
E:\work1\car1.c(20) : error C2018: unknown character '0xce'
E:\work1\car1.c(21) : error C2100: illegal indirection
E:\work1\car1.c(21) : error C2100: illegal indirection
E:\work1\car1.c(22) : error C2017: illegal escape sequence
E:\work1\car1.c(22) : error C2018: unknown character '0xcf'
E:\work1\car1.c(22) : error C2018: unknown character '0xc2'
E:\work1\car1.c(22) : error C2018: unknown character '0xc3'
E:\work1\car1.c(22) : error C2018: unknown character '0xe6'
E:\work1\car1.c(22) : error C2018: unknown character '0xb5'
E:\work1\car1.c(22) : error C2018: unknown character '0xc4'
E:\work1\car1.c(22) : error C2018: unknown character '0xb4'
E:\work1\car1.c(22) : error C2018: unknown character '0xf3'
E:\work1\car1.c(22) : error C2018: unknown character '0xbe'
E:\work1\car1.c(22) : error C2018: unknown character '0xd8'
E:\work1\car1.c(22) : error C2018: unknown character '0xd0'
E:\work1\car1.c(22) : error C2018: unknown character '0xce'
E:\work1\car1.c(23) : error C2100: illegal indirection
E:\work1\car1.c(23) : error C2100: illegal indirection
E:\work1\car1.c(24) : error C2017: illegal escape sequence
E:\work1\car1.c(24) : error C2018: unknown character '0xc2'
E:\work1\car1.c(24) : error C2018: unknown character '0xd6'
E:\work1\car1.c(24) : error C2018: unknown character '0xd7'
E:\work1\car1.c(24) : error C2018: unknown character '0xd3'
E:\work1\car1.c(25) : error C2143: syntax error : missing ')' before ';'
E:\work1\car1.c(25) : error C2198: 'line' : too few actual parameters
E:\work1\car1.c(25) : error C2100: illegal indirection
E:\work1\car1.c(25) : error C2100: illegal indirection
E:\work1\car1.c(36) : error C2017: illegal escape sequence
E:\work1\car1.c(36) : error C2018: unknown character '0xca'
E:\work1\car1.c(36) : error C2018: unknown character '0xae'
E:\work1\car1.c(36) : error C2018: unknown character '0xd7'
E:\work1\car1.c(36) : error C2018: unknown character '0xd6'
E:\work1\car1.c(36) : error C2018: unknown character '0xbc'
E:\work1\car1.c(36) : error C2018: unknown character '0xdc'
E:\work1\car1.c(37) : error C2100: illegal indirection
E:\work1\car1.c(37) : error C2100: illegal indirection
E:\work1\car1.c(38) : error C2017: illegal escape sequence
E:\work1\car1.c(38) : error C2018: unknown character '0xbe'
E:\work1\car1.c(38) : error C2018: unknown character '0xaf'
E:\work1\car1.c(38) : error C2018: unknown character '0xb5'
E:\work1\car1.c(38) : error C2018: unknown character '0xc6'
E:\work1\car1.c(39) : error C2100: illegal indirection
E:\work1\car1.c(39) : error C2100: illegal indirection
执行 cl.exe 时出错.

car1.obj - 1 error(s), 0 warning(s)
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2014-5-9 12:06:24 | 显示全部楼层
是不是计算机图形
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2011-4-18 14:59:16 | 显示全部楼层
回复 1# l-y


    我的经验是哥们你的代码是从别人那里直接复制过来的,因此有些网络操作符等编译器识别不出,但他是空格显示,你看不到,把相应的出错地方0x开头那些报错的,相应的空格去掉就行。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2011-4-12 23:38:37 | 显示全部楼层
illegal indirection :非法间接

unknown character:未识别符号
你的错误主要出现在2017 2018 2100这三行啊  本人实际操作不懂 同样求解..
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
 楼主| 发表于 2011-4-10 23:18:43 | 显示全部楼层
出现一堆乱起八糟的东西,不知道怎么改,求解!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-24 07:19

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表