I\'m wondering why I can\'t use STL maps with user-defined classes. When I compile the code below, I get the following cryptic error message. What does it mean? Also, why is
class key { int m_value; public: bool operator<(const key& src)const { return (this->m_value < src.m_value); } }; int main() { key key1; key key2; map mymap; mymap.insert(pair(key1,100)); mymap.insert(pair(key2,200)); map::iterator iter=mymap.begin(); for(;iter!=mymap.end();++iter) { cout<second<