Re: project 6...


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on October 29, 2001 at 10:17:56:

In Reply to: project 6... posted by will on October 27, 2001 at 09:10:55:

: Something strange happens when I try to do a priming read in this program: it closes the filestream after the array is read.

Actually, that's almost certainly not true. What's happening is that an input failure is occurring, probably because you're trying to read an integer and encountering the first command word.

Without the priming read it reads down to the commands fine, but the numbers are all off by one cell. If anyone knows what I'm doing wrong, I'd apreciate it.

You need to trace the execution of your code by hand and determine this. It sounds as if you have identified the problem in your description: you are storing each value at index i+1 instead of index i.




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]