fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string first;
  7. first = "Day";
  8. first += "number";
  9. cout << "\nfirst = " << first << endl;
  10.  
  11. string second;
  12. second = std::string("abc") + "def"; // This won't compile
  13. cout << "\nsecond = " << second << endl;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
first = Daynumber

second = abcdef