#include <iostream> using namespace std; int main() { std::string myString; std::string someString; std::string otherString; myString += someString += "text" += otherString += "more text"; return 0; }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:8:35: error: no match for 'operator+=' (operand types are 'const char [5]' and 'std::basic_string<char>')
myString += someString += "text" += otherString += "more text";
^
Standard output is empty