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: Fgets is not working on linux/gcc3.2.1


On Thu, 10 Apr 2003, Ajay Bansal wrote:

> Following program is not working on linux. Ideally it should read
> all the lines from "/tmp/log.txt" and print them on to the screen.
> Instead it breals after it encounters fgets for the first time.

File is opened in Append mode. Bcoz of this file pointer may 
positioned in the end of file. 

Try it by opening in Read mode.

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


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