hi friends,
whats diffrence between newline character and carriage return character?
hi friends,
whats diffrence between newline character and carriage return character?
They have different ASCII codes,
different OS use one or both of these symbols to indicate new line in the text file
I remember there was some usefull post not very long time ago about text-file formats and differences on different OSes... You can try to serch forum for this post...
Ahhh, here it is http://cboard.cprogramming.com/showt...ght=typewriter
Look for the post of Cat
Last edited by vart; 12-26-2006 at 04:59 AM.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
To be exact: http://cboard.cprogramming.com/showp...02&postcount=3 (Clicking on the small #3 in the top-right corner of the post gives you that.)
BTW, you can print a newline character with '\n' and a carriage return with '\r'.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.