I've got a method that follows
class BuildOrderStrategy
{
public:
virtual const Urgency& getUrgency() = 0;
...
}
which implementation follows
const Urgency& RandomBuildOrderStrategy::getUrgency()
{
return NULL;
}
but at compile time I'm getting this error
error C2440: 'return' : cannot convert from 'int' to 'const Urgency &'
at this time I really do want to return a NULL value from getUrgency method.. so.. what is the problem with my code? how can I fix it? I came from java world where this is completely possible..
the code of Urgency is this
class Urgency : public Investment
{
private:
public:
Urgency(BWAPI::UnitType type1, BWAPI::UpgradeType type2, BWAPI::TechType type3);
~Urgency(void);
};