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
'Papers > programming' 카테고리의 다른 글
The usage of a static class function by an object (0) | 2008.03.12 |
---|---|
[debug problem] memory allocation (0) | 2008.03.04 |
class 상호 참조 (0) | 2008.02.20 |
static class (0) | 2008.02.13 |
double pointer memory allocation (0) | 2008.01.21 |