|
From: <jos...@ya...> - 2001-02-01 07:39:08
|
--- Alan Thomas escribió: > I`m having a
strange problem. I am writing a program that
> decodes a file (holds calendar data) and encodes entries for
> appending to the file. At the end of each entry when I view the file
> in Notepad, there is a solid block. When I wrote a program to use
> get() to determine the character, it turned out to be integer value
> of 10. So, when I wrote the encoding code, at the end of each entry
> I wrote char(10) to the file.
> The items I appended to the file all have what appears to be
> a carriage return at the end of each entry. However, when I read the
> end of entry character with get(), it says it is an integer value 10!
> So, why would it look differently in the file (solid block vs. CR)?
>
>
> Thanks, Alan
Alan,
char(10) is '\n', the line feed character. When you paste into
Notepad you get the solid block in Microsoft's edit boxes
(Notepad is a simple edit box) unless you add also the char(13),
ie '\r' the carriage return.
Hope this help.
Cheers,
Chemanuel
El rincón de Chemanuel - Resources for Windows programming in C++
---------------------------------
Do You Yahoo!?
- Get personalized email addresses from Yahoo! Mail Personal Address - only $35 a year! |