Expected primary expression before token

Hi,I am new to cplusplus and would like to know the error in this code
1
2
3
4
5
6
7
8
9
10
void initpoly(struct poly *p)
{
     int i;
     p->noofterms=0;
     for(i=0;i<MAX;i++)
     {
       p->t[i].coeff=0;
       p->t[i].exp=0;
     }
}


I am not posting the entire program because it is lengthy.I am getting the error"Expected primary expression before token ;" in the for loop..
Any help would be greatly appreciated..I am using dev c++ as compiler,,
It sounds like the compiler has not seen all of the symbols your function is using. Has MAX been defined? Is struct poly visible?
No need to answer.. I found the bug in my code...
Topic archived. No new replies allowed.