I want to omit extra bit in txt file.eg ....ÿ 0111111110111101100011011010010001
in this string we want to omit extra bit ÿ
which is appeared when we save a binary string. Save fun is as follow. please help me.
void LFSR_ECDlg::Onsave()
{
this->UpdateData();
CFile bitstream;
char strFilter[] = { "Stream Records (*.mpl)|*.mpl| (*.pis)|*.pis|All Files (*.*)|*.*||" };
CFileDialog FileDlg(FALSE, ".mpl", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
if( bitstream.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite) == FALSE )
return;
CArchive ar(&bitstream, CArchive::store);
CString txt;
txt="";
txt.Format("%s",m_B);//by ANO
AfxMessageBox (txt);//by ANO
txt=m_B;//by ANO
ar <<txt;//by ANO
ar.Close();
}
else
return;
bitstream.Close();
}