我想讀取文件永遠我怎麼能去到文件的開頭
這裏是我的代碼轉至文件的開頭
FILE* inp_file=fopen("Input_file.bin","rb");
uint8* buffer;
buffer=(uint8*)malloc(nSize);
uint32 nSize =1000;
while(1)
{
while(! feof (inp_file))
{
memset (buffer,'0',nSize);
fread (buffer,nSize,1,inp_file);
Sleep(5);
}
//Here I want to go to the beginning of the file
}
http://stackoverflow.com/questions/5431941/while-feof-file-is-always-wrong –
'男人fseek' ... –
使用'無效倒帶(FILE *流');' –