Ok, I am having some problems trying to store my KeyType as a pointer.
Error message below ( may not be that helpful )
Error: Could not find a match for std::map<MarketKey*, market_item_t*,
std::less<MarketKey*>, std::allocator<std:
air<MarketKey*const,
market_item_t*>>>::find(const MarketKey*).
It seems the find method is failing.
The find method is :
MktIter it = marketsMap->find(key);
where MktIter is : map < MarketKey*, market_item_t* >::iterator
MktIter;
my map is defined as : map < MarketKey*, market_item_t* > *marketsMap;
My MarketKey is:
class MarketKey : public BaseKey
{
public:
MarketKey(){};
virtual ~MarketKey(){};
bool operator<(const MarketKey &rhs) const;
void setMarket(uint8_t market);
uint8_t getMarket() const;
};
Now is there anything special i have to do with operator< now I am
wanting to store pointers as keys?? It works fine with 'by value' keys
but as soon as i try and use pointers i get compiliation errors