Originally Posted by Dave_Sinkula
What am I reading incorrectly?
In http://msdn.microsoft.com/library/de...c_._wfopen.asp
the paragraph following "Open in text ... " saysand a few lines below thatAlso, in text mode, carriage return–linefeed combinations are translated into single linefeeds on input...and the _fmode page says that the default setting of _fmode is _O_TEXT.If t or b is not given in mode, the default translation mode is defined by the global variable _fmode.
(I take that to be the explanation why my original code worked in MSVC even though I used "r", not "t" in fopen(), the input file had CR/LF on each line AND I had nothing in my original code to handle the CRs. If I'm reading it wrong, then why did my code work in MSVC but not in linux/gcc?)