lines 33 and 34:
>>char *c;
>>c = &line[0];
That is not necessary. Just pass line.c_str() to the function on line 39
line 71: all you have to do is use isdigit() function
if( isdigit(*c))
line 82: get rid of all that crap and use isalpha()
if( isalpha(*c) )
The program is missing a set of { and }
bool primary (const char *c)
{
if(integer(c))
return true;
else if (literal(c))
return true;
else if (*c == '(')
{
++c;
if (expr(c))
{
++c;
if (*c == ')')
{
++c;
return true;
}
return false;
}
}
return false;
}
Last edited by Ancient Dragon; Oct 20th, 2009 at 10:57 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,953 posts
since Aug 2005