What the?



I wanted to verify that I was getting the correct data so I decided to
temporarily create a CStdioFile and dump the results for my viewing
pleasure. The code looks like this:

CStdioFile DatFile; //opened modeCreate | modeNoTruncate | modeReadWrite
float DataArray[600];//populated elsewhere in the program with the int
DataCount being the number of records.
CString Msg.
int DataCount;
DWORD Cnt;

for(x=0;x<DataCount;x++)
{
Msg.format("%2.5f\n",DataArray[x]);
WriteFile(DatFile,LPCTSTR(Msg),Msg.GetLength(),&Cnt,0);
}

IT DOESN'T WORK! The data is written to the file just fine but there are no
newlines!! I've tried adding white spaces but nothing changes. If I replace
the \n with \r\n it works...

What's going on?

Ron H.


-----------------
www.Newsgroup-Binaries.com - *Completion*Retention*Speed*
Access your favorite newsgroups from home or on the road
-----------------
.