"Someonekicked" writes:
if you create a new file , open it and only hit enter then save. if you
use seekg(0,ios::end) and then tellg(), tellg() will return 2 (not 1); so
new line character is considered as two characters.
Is there a possible way so new line character can be considered (reading
and writing) as one character ? I need that in my program and the new line
character being two characters is messing up everything.
In a non-Unix system, new line is usually silently stored as two characters,
CR and LF. When these characters are retrieved, they are *silently*
converted to one character again. In a binary file none of these
conversions occur. The word "binary" was a poor choice to describe this
phenomena.
I can't tell exactly what you are trying to do but investigate this area.
If you think of "binary" as meaning "strict ASCII" it may help get your arms
around this thing.