//The full class is not written out btw didn't want to confuse you with
//all the other code
class Sprite
{
public:
virtual ~Sprite () {}
virtualconst Sprite* GetObj() const = 0;
};
class Circle: public Base {
public:
virtualconst Circle* GetObj() const {
returnthis;
}
};
class Square: public Base {
public:
virtualconst Square* GetObj() const {
returnthis;
}
};
//these functions will be called
float CheckCollision(const Circle &cir1, const Circle &cir2);
float CheckCollision(const Circle &cir, const Square &sqr);
float CheckCollision(const Square &sqr1, const Square &sqr2);
float CheckCollision(const Square &sqr, const Circle &cir);
float CheckCollision(const Square &sqr, const Vector2 &vect);
float CheckCollision(const Circle &cir, const Vector2 &vect);
// compiler wants me to also have
// float CheckCollision(const Sprite &spr, const Sprite &spr2);
// but this function will never get called
//so if I do something like this
float pen = CheckCollision(*sprite[i]->GetObj(),*sprite[j]->GetObj());
Can you post the actual error message? Most of us don't have the error codes memorized. Plus the error message tells you other things like the actual line number that the error is on, what symbol is causing the problem, etc, etc.