fork(2) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. const char buf[30] = "aaa";
  8. string s("hello-");
  9. s.append(buf);
  10. cout << s << endl;
  11. cout << s.size() << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
hello-aaa
9