Can anyone explain the implementation/algo tha开发者_Go百科t was used in rewind function? or is it possible to implement rewind function using lseek()?
Here's a quote from a reference:
A call to rewind is equivalent to:
fseek ( stream , 0L , SEEK_SET );
except that, unlike fseek, rewind clears the error indicator.
http://www.cplusplus.com/reference/clibrary/cstdio/rewind/
精彩评论