The first way works. You just have to use ostr.str() to get the string from the stringstream. I think this is overkill for string concatenation because the string class supports it directly.
The second way doesn't work (exactly as typed above) because operator+() is being applied to a string literal (pointer) not a std::string object. This is rather interesting and I hope you study the following examples.
1 2 3
// here's the "verbose" solution
string str = "it is a";
string st2 += str;
string st2 = str + "it is a"; // works because there is a str.operator+( const char * )