飞燕,能详细说明么?

You have lots more to work on! Never give up!c language!
2007-08-26 19:01
内存对齐你能解释一下吗?还有 printf("%ld\n",bmpInfo.biSizeImage);我怎么读到的怎么是0。奇怪啊。
我看有的人这样写fread(&bmpFile, sizeof(HEAD)-2,1, file);
2007-08-26 19:21

2007-08-26 19:25
2007-08-26 21:49
2007-08-26 21:56
#include <stdio.h>
#include <conio.h>
int main(void)
{
char ch;
FILE *fpOut,*fpIn;
fpOut=fopen("1.gif","rb+");
fpIn=fopen("2.gif","wb+");
if(fpOut==NULL || fpIn==NULL)
{
printf("Cannot open the img!\n");
exit(1);
}
ch=fgetc(fpOut);
while(!feof(fpOut))
{
fputc(ch,fpIn);
ch=fgetc(fpOut);
}
fclose(fpOut);
fclose(fpIn);
printf("Complete!Press any key to exit...\n");
getch();
return 0;
}

2007-08-26 22:21
我只是把while(!feof(fpOut))改成了while((ch=fgetc(fpOut))!=EOF),怎么 就不可以呢??
2007-08-27 09:45
ch必须是int类型。。。。。。



2007-08-27 10:40
2007-08-27 11:33