JasBascom wrote:
I have used the strcpy function. And the '\n' statement along with null
terminators in the original copying of this text. what I need is the answer to
my query not more questions.
how do I format a binary file to accept '\n' etc?
And the answer is still the same: You don't. You simply write
a '\n' character to the file when you need it.
The trick with binary files is this: Whatever you write to that output
stream is written 1:1 to the file, no more, no less. So if you need
some special characters to appear in the file, you have to write them.
This is different to text mode, where the output stream takes care
of some special characters and the conventions used on the operating
system you use. Eg. a simple '\n' can be replaced by the output
stream with the sequence '\r' '\n' if the conventions on your
operating system require this. Same in the other direction: if
a text mode input stream reads the sequence '\r' '\n', it may replace
that with a simple '\n'.
--
Karl Heinz Buchegger
kb******@gascad.at