logo       

Re: FILE Pointer: msg#00250

gcc.help

Subject: Re: FILE Pointer

> At 10:12 AM 5/27/03 -0500, Eljay Love-Jensen wrote:

> > Consider a FILE structure to be opaque. Like a "typedef void
> > FILE", so a "FILE*" is a "void*". (On some platforms, that's
> > exactly what a FILE is.)

I understood the porting issue. But still I am not able to get the
complete idea behind this void. So my foolish Qs are :

The sizeof(FILE) is 148 & sizeof(void) is 1. Does it mean anything ?
and System dependent lib only can process the file descriptor ?

I try to pass a void ptr to the ftell(), then I got the compilation
error "invalid use of void expression". With out casting, How it
found that, ptr is NOT a type FILE ?

TIA,
--
Bharathi S, IndLinuX Team, (__)
DON Lab, TeNeT Group, oo )
IIT-Madras, Chennai-INDIA. (_/\

Don't scream for the Change. Become the Change.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise