class Game()
{
void add(set<Velocity> & v);
}
class Velocity()
{
private:
// Member Variables
public:
// Constructors and methods
}
void Game::add(set<Velocity> &velocities)
{
Velocity v;
v.setVelocity();
v.setSource();
velocities.insert(v);
}
As you can see I have a custom class called Game and it has a public method called Add which adds a velocity object to the set. When the insert(v) code executes it throws me an error: invalid operands to binary expression ('const Velocity' and 'const Velocity') {return __x < __y;}
I am not sure how to fix this, I would appreciate any help or suggestions. Thanks a bunch.