我有这段代码,当调用GetRecords(st_nTag, st_nValue);这个函数后出现
this CXX0017: Error: symbol "this" not found 错误,我该怎么办啊?void CDialog_sx::OnOK()
{
CString szPath,szResultPath,m_szRawPureName;
CString szErr,szProfile,m_szcountFileName;
static int st_nTag = 0, st_nValue = 0;
DWORD dwRead;
//Acc_nbr calling_nbr[500000]; UpdateData(TRUE);
szPath=m_edit;
szResultPath=m_edit2;
st_nTag = 0;
st_nValue = 0;
if (!m_fileopen.Open(szPath, CFile::modeRead|CFile::typeBinary))
{
szErr.Format("源文件%s打开失败", szPath);
MessageBox( szErr, "错误", MB_OK|MB_ICONERROR);
} m_filewrite.Open(szResultPath, CFile::modeWrite|CFile::modeWrite);
dwRead = MAX_READ;
m_filewrite.SeekToEnd();
while (dwRead == MAX_READ)
{
memset(m_strInBuffer, 0, sizeof(m_strInBuffer));
dwRead = m_fileopen.Read(m_strInBuffer, MAX_READ);
if (dwRead == 0)
break;
if (dwRead < MAX_READ)
{
m_strInBuffer[dwRead] = 0x0a;
m_strInBuffer[dwRead+1] = 0x0d;
m_strInBuffer[dwRead+2] = 0;
}
GetRecords(st_nTag, st_nValue);
WriteToLog();
}
m_filewrite.Close();
}
void CDialog_sx::GetRecords(int& nTag, int& nValue)
{
int flag=0;
int nLen = strlen(m_strInBuffer); for (int i = 0; i < nLen; i++)
{
if (i >= 7&&i<11)
{
areacode[i-7]=m_strInBuffer[i];
if (i==10)
areacode[i-6]='\0';
continue;
}
else if (i >= 11&&i<18)
{
calling[i-11]=m_strInBuffer[i];
if (i==17)
calling[i-10]='\0';
continue;
}
else if (m_strInBuffer[i] == 0x0a)
{
flag=1;
continue;
}
if (flag==1)
{
ticket.Format("20 41 %s %s 1 999999999 133 10724\n",areacode,calling);
}
}
}void CDialog_sx::WriteToLog()
{
//m_filewrite.Write(m_strInBuffer, strlen(m_strInBuffer));
m_filewrite.Write(ticket, strlen(ticket));
}
this CXX0017: Error: symbol "this" not found 错误,我该怎么办啊?void CDialog_sx::OnOK()
{
CString szPath,szResultPath,m_szRawPureName;
CString szErr,szProfile,m_szcountFileName;
static int st_nTag = 0, st_nValue = 0;
DWORD dwRead;
//Acc_nbr calling_nbr[500000]; UpdateData(TRUE);
szPath=m_edit;
szResultPath=m_edit2;
st_nTag = 0;
st_nValue = 0;
if (!m_fileopen.Open(szPath, CFile::modeRead|CFile::typeBinary))
{
szErr.Format("源文件%s打开失败", szPath);
MessageBox( szErr, "错误", MB_OK|MB_ICONERROR);
} m_filewrite.Open(szResultPath, CFile::modeWrite|CFile::modeWrite);
dwRead = MAX_READ;
m_filewrite.SeekToEnd();
while (dwRead == MAX_READ)
{
memset(m_strInBuffer, 0, sizeof(m_strInBuffer));
dwRead = m_fileopen.Read(m_strInBuffer, MAX_READ);
if (dwRead == 0)
break;
if (dwRead < MAX_READ)
{
m_strInBuffer[dwRead] = 0x0a;
m_strInBuffer[dwRead+1] = 0x0d;
m_strInBuffer[dwRead+2] = 0;
}
GetRecords(st_nTag, st_nValue);
WriteToLog();
}
m_filewrite.Close();
}
void CDialog_sx::GetRecords(int& nTag, int& nValue)
{
int flag=0;
int nLen = strlen(m_strInBuffer); for (int i = 0; i < nLen; i++)
{
if (i >= 7&&i<11)
{
areacode[i-7]=m_strInBuffer[i];
if (i==10)
areacode[i-6]='\0';
continue;
}
else if (i >= 11&&i<18)
{
calling[i-11]=m_strInBuffer[i];
if (i==17)
calling[i-10]='\0';
continue;
}
else if (m_strInBuffer[i] == 0x0a)
{
flag=1;
continue;
}
if (flag==1)
{
ticket.Format("20 41 %s %s 1 999999999 133 10724\n",areacode,calling);
}
}
}void CDialog_sx::WriteToLog()
{
//m_filewrite.Write(m_strInBuffer, strlen(m_strInBuffer));
m_filewrite.Write(ticket, strlen(ticket));
}
看错误在那一行
看看附近的行
还有传进来的参数,在下面的程序中,根本没用到啊。
时候出的这个错误