I hope someone might be able to answer why the following doesn\'t work. Bear with me though, I am still very much a noob... I just cannot get to the bottom of why the follow
There's no exact std::string::operator=. The candidates are, paraphrased,
s = (const std::string)(std::string)t;
s = (const char*)t;
s = (char)(int)t;
I think things will work if you change it to return const std::string. (EDIT: I'm wrong.) Also note that the first function should return const char *. If you need to cast a string literal to char*, you're doing something wrong; string literals are not writeable.