fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main() {
  5. std::string str = "hello " + "world";
  6. std::cout << str;
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:31: error: invalid operands of types ‘const char [7]’ and ‘const char [6]’ to binary ‘operator+’
  std::string str = "hello " + "world";
                               ^
stdout
Standard output is empty