• Advertisement
Sign in to follow this  

Const Confused

This topic is 2933 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

Hi, I'm trying to write a game using OOBB code that a friend of mine wrote. He's now unavailable and I've run into an error in my code involving his class. OOBB.h
void Set(Vector& newCenter, const double w, const double h, double angle);

MyClass.cpp
OBB2D Current;
Current.Set(Pos, (double)pCharacters[CharsOnScreen]->GetW(), (double)pCharacters[CharsOnScreen]->GetH(), (double)pCharacters[CharsOnScreen]->GetAngle());

The method definition is in OOBB.h and I'm trying to use it in MyClass.cpp. I'm getting an error saying "No matching function call OOBB::Set(SVec2&, double, double, double)" I think its because of the const in the method definition, but I dont know if that is it or how to fix it. Cheers

Share this post


Link to post
Share on other sites
Advertisement
You are passing in a SVec2& for the newCenter parameter, but it expects a Vector&.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement