Was accessing a file in a code with both C# and C++. When file is opened in notepad it looks like this (one integer at left and the rest of numbers are double):
But the same file when opened with WordPad looks like this (one integer next to each double):
Why do they look different?
It has to do with the way that newlines are encoded in your file. Windows recognizes a newline as consisting of two characters (\r\n
) whereas some other operating systems, namely Unix-based ones, use only \n
or \r
. WordPad is smart enough to recognize both newline types, but Notepad is not.