vector <point> polygon;
this is my prototype for a class called polygon:
polyg & operator=(polyg& pg);//5

here is the directions:

make An overloaded operator = with a reference parameter of type polyg and a return type of reference polyg.
First make sure its not the same object because if it is then nothing to do. If a different object then
clear the polygon and add the points of the passed polygon to it.

polyg & polyg::operator=(polyg& pg);//5
               polyg pgtemp;
        if(pgtemp.polygon[i] == pg.polygon[i])

            for (int i=0,i<polygon.size(),i++)


does that work? also i keep gettin a compile error saying:
binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
polyg &polyg::operator =(polyg &)' : member function redeclaration not allowed
'{' : missing function header old-style formal list?)

>does that work?
>also i keep gettin a compile error
Hmm, if you get an error then it probably doesn't work.

>polyg & polyg::operator=(polyg& pg);//5
Remove the semicolon.