This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FILE Pointer


Hi Bharathi,

>How to get the filename from the filepointer?

You cannot.

>What are the other informations we can get from FILE structure?

feof(fp) -- tells you if the file is at the end of file
ferror(fp) -- test whether read/write error has occurred
ftell(fp) -- tells you the offset into the file
fileno(fp) -- (non-ANSI) tells you the file descriptor of the fp
fgetpos(fp, &pos) -- for noting positions, used in conjunction with fsetpos

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]