Re: newbie question [C language]



Fred_NacH wrote:
) I was wondering, how to retrieve the size/length of a file by only using
) the ansi functions...

Read from the file until you reach the end and count how much you've read.

Functions (stat) that retrieve file length etc. are not in the ANSI C spec
AKAIK, although I admit I'm not sure.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.



Relevant Pages

  • Re: newbie question [C language]
    ... how to retrieve the size/length of a file by only using ... >> the ansi functions... ... > these discussions which flare up from time to time. ... I wonder if you have ever tried it on fat binaries under OS X. ...
    (comp.programming)
  • Re: newbie question [C language]
    ... >> the ansi functions... ... > Functions that retrieve file length etc. are not in the ANSI C spec ... Randy Howard (2reply remove FOOBAR) ... Prev by Date: ...
    (comp.programming)
  • Re: newbie question [C language]
    ... how to retrieve the size/length of a file by only using ... >Open the file in *binary* mode, seek to end of file, and use ftell() to see ... This won't work if you don't have read permission on the file. ... it doesn't matter if there is some magical ansi way of doing this. ...
    (comp.programming)
  • Re: Computer programmers habits in electronics
    ... is perfect in a parallel SIMD world. ... mention of it being ANSI C;) ... PeteS ... Prev by Date: ...
    (sci.electronics.design)
  • Re: How to get/set a session token
    ... HTH ... How can you retrieve a session token? ... How can you check for the existance of a session token? ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)