Using an std::string as a key for an std::map
问题 I would like to have an std::map (int .NET 4.0). We of course know that a map is a tree and requires an operator< that string does not define for us. Error 24 error C2676: binary '<' : 'const std::string' does not define this operator or a conversion to a type acceptable to the predefined operator c:\program files\microsoft visual studio 10.0\vc\include\xfunctional 125 1 FXCMMarketDataServer So I put my google-foo to work and found this solution: struct StringComparerForMap { public: bool