std::map and std::string
Monday, May 25th, 2009Categories: Programming
This is a bit trivial, but there is a chance that this information will save someone a lot of time looking in the wrong place, so I thought I’d post it. I ran into this using Visual C++ 2008, but it probably applies to some other C++-compilers as well.
If you are using an std::map that has an std::string as a key or value and you get all kinds of error messages from your compiler about template argument deduction or implicit conversions, you probably forgot to include <string>.
