Is there a way (without overloading) to call a function like this
GetValue("one");
//AND
std::string test("one");
GetValue(test);
The function is simply:
int GetValue(const std::string &MyString)
{
return MyMap[MyString];
}
This overload does the job:
int GetValue(const char* MyString)
{
return MyMap[MyString];
}
But that seems a little annoying to have to do. Any suggestions?
Thanks
Dave