I assume you mean square boxes when you look at the file in a text editor. Those are non-printable characters, some of the data your are writting is not actually text.
This is possible if you get "\r'\n" the wrong way round i.e. "\n\r"
but only for first line it is showing square box in starting . for next line and all it parse correctly.i have to do substring comparision. if i take that first line string due to square box i cant do comparision. how can i remove that?
my code is:
to save file to text box:
CArchive ar(&f,CArchive::store)
ar>>m_buffer;
to parse the file
if(!ar.readString(StrLine))
return;
do
{
StrTotal+=StrLine;
StrTotal+=_T("\r\n");
}while(ar.ReadString(StrLine));
m_buffer=StrTotal;
UpDatedata(FALSE)
it parse the file correctly but giving square boxes at starting.