Have you corrupted outFile prior to this attempt? The supporting code may contain your answer.
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
Well there's nothing wrong with that line, so it must be something else.
My guess is that you've trashed memory somewhere else in your program, and this just happens to be where you find out. It could have crashed at any other line as well, and then no doubt you would have posted that line instead.
To make any real progress of diagnosing the problem, you would need to post the whole program.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953