You should check the end of line condition in every loop, for instance:
Poonamol wrote:
while (pLine[i] && pLine[i] != ' ' && pLine[i] != '\t' &&
pLine[i] != ';' && pLine[i] != '#')
{ i++; }
would become
while (pLine[i] && pLine[i] != ' ' && pLine[i] != '\t' &&
pLine[i] != ';' && pLine[i] != '#')
{
if ( pLine[i] == '\n') return 0;
i++;
}
:)