#include
int main()
{
const std::string exclam = \"!\";
const std::string message = \"Hello\" + \", world\" + exclam;
std::cout <&l
C++ doesn't do many of the automatic 'behind the scenes' conversations of other OO languages.
As Doug said you need to do std::string("hello") + std::string(" world"), the language doesn't do this for you.
However you can do
std::cout << "hello" << "world" << exclam;
Because std::cout knows how to print a const char[] as well as a string