I have a multimap declared as:
typedef multimap <int, std::string> MM;
I was having trouble doing it how I normally do with no luck so used this method I found online:
std::string IntToStr( int n )
{
std::stringstream result;
result << n;
return result.str();
}
Then I call it passing it the int value of my multi map:
std::string stringNumber = IntToStr((*i).first);
What I get back is a bit of memory location I think, and the int converted tagged onto the end of this like:
64D20D6017
Where 17 is the score. What am I doing wrong? All I wanted to do was convert the results into a string to be used later.
Just incase anyone ever gets a similar output, this was due to accidentally adding 2
coutto the line: