fork download
  1. #include <iostream>
  2.  
  3. int main ()
  4. {
  5. std::string foo( "test" );
  6. std::cout << foo << std::endl;
  7.  
  8. foo[ 0 ] = 'too long for a char';
  9. std::cout << foo << std::endl;
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
test
rest