Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

fseek

does fseek fail(return nozero), if it goes past the end of the file?
jesse.laeuchli@usa.net
0
laeuchli
Asked:
laeuchli
1 Solution
 
seedyCommented:
Seeking pas t end of file will succeed.  So, fseek will not return nonzero to indicate error.
0
 
RONSLOWCommented:
The documentation (in VC) on fseek says:

"You can use fseek to reposition the pointer anywhere in a file. The pointer can also be positioned BEYOND THE END OF THE FILE. fseek clears the end-of-file indicator and negates the effect of any prior ungetc calls against stream."

However, it is not clear what will be written to / read from the file after an fseek past eof.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now