@androidi: The C++ code compiles just fine for me. I am using Dev11. Do you have a link to the whole project? Note that x is a std::pair<int, string>, it almost seems that you are using x as something else. Hard to say just based on that output, and without fully seeing the whole code.