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