This code works fine:
string s = "Hello "; s += "world"; printf("%s", s.c_str());
However, why would this not work: