fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. char* example = new char;
  7. delete example; //OK
  8. delete example; //Not OK, you no longer own the memory to example
  9. return 0;
  10. }
Runtime error #stdin #stdout #stderr 0s 3412KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
*** Error in `./prog': double free or corruption (fasttop): 0x09d2ea10 ***