Date: Sun, 15 Aug 1999 14:03:58 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Bas Hamstra cc: djgpp AT delorie DOT com Subject: Re: length of file (baffling me) In-Reply-To: <7p51mk$qg2$1@reader1.wxs.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 15 Aug 1999, Bas Hamstra wrote: > >If you would have read the documentation on the filelength function, you > would > >have discovered that it takes an argument of a filedescriptor, and you > can't just > >cast a FILE* to an int and hope it works. The docs clearly say to use the > fileno > >macro. > > > >printf("File length: %i", filelength(fileno(fp))); > > Man, can''t you try to be a bit more friendly? Be nice! Just answer the > question and don't go "if you had done this, you would have known that". I don't see anything wrong in pointing out that the information is in the docs that you should have read before posting a question. Everybody should read the docs before asking for help. Please try doing that in the future.