Sign in to follow this  

Problem with c2679

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm upgrading code from Visual Studio 6 to Visual Studio 2005 and I'm absolutely stumped on what the compiler is complaing about. C2679. I've been reviewing the code over and over. error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Position *' Not exactly sure how to overload the vector '=' operator either and hopefully I can just fix the bug in the code that gives me the error. Here it is: void Graphics::RemoveDuplicatePositions(){ Vector<Position>:: pos_it; int vec_size = positions.size(); for(int i = 0; i < vec_size && vec_size != 1) { pos_it = &positions[i]; //ERROR HERE: C2679 'Position *' if(positions[i] == positions[(i + 1) % vec_size]) { positions.erase(pos_it); vec_size = positions.size(); } else { i++; } }//end loop } What do I need to do to fix this problem? (I wish I could copy and paste this but, I'm typing it by hand from referring to the computer that has Visual Studio yet no internet connection)

Share this post


Link to post
Share on other sites

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this