fork(2) download
  1. #include <iostream>
  2.  
  3.  
  4. int main()
  5. {
  6. const char* p = ++"asdf";
  7. std::cout << "ok\n";
  8. return 0;
  9. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:21: error: increment of read-only location ‘(const char*)"asdf"’
   const char* p = ++"asdf";
                     ^~~~~~
prog.cpp:6:21: error: lvalue required as increment operand
stdout
Standard output is empty