CString strPath = "C:\\myfile.bin";
CStdioFile myFile;
TCHAR strBuf[16]; //or CString
BOOL bResult = myFile.Open(strPath,CFile::modeRead
| CFile::typeBinary);
if(!bResult)
{
AfxMessage(strPath + " Could not be oppend");
}
else
{
while(myFile.ReadString(strBuf))
{
_tcscat(strBuf,_T("\n"));
// write to another file
}
}