Re: Simple C File IO Question (with code listing)
Re: Simple C File IO Question (with code listing)
- Subject: Re: Simple C File IO Question (with code listing)
- From: Sam Daniel <email@hidden>
- Date: Sun, 10 Jul 2005 22:01:27 -0700
Hi Charlton,
Thank you for your prompt response and suggestion.
I just entered the full path for each of the IO files and it worked
after I also augmented putc( c,output) to putc((c),output), another
surprise. Without this last change the output file grew
uncotrolably ...
Sam Daniel
email@hidden
On Jul 10, 2005, at 9:24 PM, Charlton Wilbur wrote:
On Jul 11, 2005, at 12:04 AM, Sam Daniel wrote:
It is not clear whether the files, input
and output, have been opened properly for read and write,
respectively, nor that they were closed correctly.
So that's the obvious thing to check! One of your calls to fopen()
is failing. Check to be sure that neither input nor output is
null, and if one is, take a look at errno to see what the problem is.
My suspicion is that you're making an assumption about the
process's working directory that happens not to be accurate.
(Well, I *know* you're making an assumption about the process's
working directory, and I suspect that it's not an accurate one.)
Charlton
--
Charlton Wilbur
email@hidden
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden