2 ms·
For the first problem, see std::unordered_map (was std::tr1::unordered_map). For the second problem, see boost::flyweight<std::string>. And/or, "typedef std::s
by briansmith 16y ago
For the first problem, see std::unordered_map (was std::tr1::unordered_map).
For the second problem, see boost::flyweight<std::string>. And/or, "typedef std::shared_ptr<std::string> string" and add "new" in front of every string you create.
- malkia 16y agoFunny, a colleague just used std::tr1:unordered_map, and it was available in his VS2008 (I guess SP1), but not on everyone's machine. Yes, it seems to be the right thing - unordered, while hash_map is still ordered (it wants less operator).