file input

Pages: 12
closed account (Dy7SLyTq)
http://www.thefreedictionary.com/assertion
i have evidence and if you read the page,
often with no support or attempt at proof.
if you read the page i linked to youll see i am actually correct just outdated
Ozwurld wrote:
i have heard people say there is something wrong with that approach, could you please elaborate on what the flaw is:
Well, you already demonstrated an example of why it is flawed recently when your program failed here:
http://www.cplusplus.com/forum/beginner/120781/#msg657349

and I gave an explanation of what had gone wrong:
http://www.cplusplus.com/forum/beginner/120781/#msg657376
DTSCode wrote:
i have evidence and if you read the page i linked to youll see i am actually correct just outdated

You have no "evidence" and the page you linked to says no such thing. Even with the crappy definition given by thefreedictionary.com which can't seem to separate connotation from denotation, it is definitely an assertion you made.

Use a more reputable dictionary. Merriam Webster/Oxford/Cambridge...

Regardless of what you call it, just don't do it any more. =P
closed account (Dy7SLyTq)
i actually do have evidence.
CP/M would not know that the file was 11 bytes long – it would only know it took up a single disk block, which would be a minimum of 128 bytes. As people generally like to know how big their files appear to be, rather than the number of blocks they take up, an end-of-file character was needed. CP/M re-used the Control-Z character (decimal code 26, hex 1A, original intended use lost in the mists of time) from the ASCII character set for this purpose – when a CP/M application read a Control-Z character it would typically treat that read as though an end-of-file had occurred.. There was nothing forcing applications to do this; apps that processed binary data would need some other means of knowing if they were at the end-of-file, and the OS itself did not treat Control-Z specially.
my books that got me into c and c++ programming also would say "until the EOF character has been reached.". i looked it up on merriam-webster and i guess that is an assertion, but im not going to apologize or stop, because i wasnt wrong. there was an eof character, just not anymore
DTSCode wrote:
i actually do have evidence.

It has never been right to assume in C++ that there is a character that signifies EOF which is stored in files. The eccentricities of CP/M have nothing to do with C++. The imprecision continues.


DTSCode wrote:
my books that got me into c and c++ programming also would say "until the EOF character has been reached."

There are plenty of bad books out there and plenty of folk who misread when they were beginners.


DTSCode wrote:
im not going to apologize or stop, because i wasnt wrong. there was an eof character, just not anymore

I don't need an apology, but you are wrong. Our discussion on C++ forums occurs in the context of C++, not a defunct operating system.

[edit: grammar]
Last edited on
closed account (Dy7SLyTq)
lets just drop it because
-neither of us are going to agree
-op's question has been answered
-i now know that on modern os's exact file length is known
-it would do no good to convince the other
thank you! for pete's sake
Hey, one last note.
Want to know where else .eof() returns true and the read operation fails?
Currupted drive.
Usually happens on CD/DVD's, but also happens on old HDD/USB's.

And that's one MORE reason to loop on the operation itself.

If you want to discuss further, do, otherwise, don't.
I just wanted to point this out.
Last edited on
Topic archived. No new replies allowed.
Pages: 12