Why it is possible to do
const string exclam = \"!\";
const string str = exclam + \"Hello\" + \" world\";
And not possible to do this:
const string exclam = "!"; // Initialize a c++ string with an ansi c string
const string str = exclam + "Hello" + " world"; // Using the operator+ method of exclam
You can do it because the operator+ of exclam will return a new string containing "!Hello", on which you subsequently call the operator+ with " world" as parameter, so you get another string which, finally, gets assigned to str by means of the copy constructor.
On the other hand
const string str = "Hello" + " world" + exclam;
cannot be executed because "Hello" is just a const char *, which doesn't have a operator+ taking a const char * as parameter.