Papers/programming
debugging problem
tomato13
2008. 2. 26. 19:26
int CXML::m_GetNum(char* pStr)
{
int nCnt = 0;
char cStr[100];
int i = 0;
CVirtualFile::m_SetCurLine(0);
while(CVirtualFile::m_FGets(cStr))
{
if(m_isThereTheWord(cStr, pStr)!=-1)
{
nCnt++;
}
i++;
}
return nCnt;
}
int CVirtualFile::m_FGets(char *pStr)
{
int nRet = 1;
strcpy(pStr, m_buffer[m_nCurLine]);
m_nCurLine++;
if( m_nLastLine<m_nCurLine )
{
nRet = 0;
}
return nRet;
}
debugging status:
nCnt = -33686019
i = 1587