fork(2) download
  1. void fn()
  2. {
  3.  
  4. const int a = 10;
  5. int* b = &a;
  6. *b = 20;
  7.  
  8.  
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:6: error: cannot initialize a variable of type 'int *' with an rvalue of type 'const int *'
int* b = &a;
     ^   ~~
1 error generated.
stdout
Standard output is empty