#include <iostream> #include <string> int main() { std::string str = "hello " + "world"; std::cout << str; }
Standard input is empty
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"; ^
Standard output is empty