请教关于c循环读取文件的问题
我读取了一个文件直接上源代码
fseek(sup_in,0,SEEK_END);
size=ftell(sup_in);
fseek(sup_in,0,SEEK_SET);
printf("the size of the file is:%10X\n\n",size);
fread(file_buff,size,1,sup_in);
fread(§ion.identifier[1],sizeof(unsigned char),1,sup_in);
fread(§ion.identifier[2],sizeof(unsigned char),1,sup_in);
if(section.identifier[1]=='P'&§ion.identifier[2]=='G')
{
fread(§ion.PTS,sizeof(int),1,sup_in);
printf("time is:%d\n",section.PTS);
fread(§ion.DTS,sizeof(int),1,sup_in);
fread(&metadatablock.type,sizeof(unsigned char),1,sup_in);
printf("type is :%X");
while(metadatablock.type==rle_bmp_type)
{
process_rle_bmp();
}
请问如何对文件进行逐字节的循环读取,同时符合PG两个字符要求的读取下来,然后继续下一个是如何实现呢,谢谢大家的回帖。