c 语言,大家来帮帮我看看
C语言高手来帮我看看,问题出在哪里。打出来的有乱码#include<stdio.h>
#include<graphics.h>
void main()
{char *str="地大也没有我的藏身";
unsigned int j,len,i;
FILE *fp;
unsigned char buffer[32];
int gd=DETECT,gm,x=0,y=0;
initgraph(&gd,&gm,"c:\\turboc2");
if((fp=fopen("c:\\HZK16","rb"))==NULL)
{printf("can not open hzk16 file!");
exit(1);
}
while(*str)
{
if((*str & 0x80) && (*(str + 1) & 0x80))
{len=32L*(((*str - 0xa1) & 0x7f)*94 + ((*(str + 1) -0xa1)&0x7f));
fseek(fp,len,SEEK_SET);
fread(buffer, 32, 1, fp);
for(i=0;i<16;i++)
{j=buffer[2*i];
j=(j << 8)| buffer[i*2+1];
setlinestyle(USERBIT_LINE,j,NORM_WIDTH);
line(x+15,y+i,x,y+i);}
x=x+16;
str=str+2;}
else
{
bufch[0] = *str++;
outtextxy(x, y - 3, (char *) bufch);
x += 8;}
getch();}
closegraph();
close(fp);
}