fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string n = NULL;
  8.  
  9. cout << "blah: " << n << " foo!" << endl; // never printed
  10. cout << "BLAH" << endl; // never printed
  11. cerr << "FOO" << endl; // never printed return 0;
  12. }
Runtime error #stdin #stdout #stderr 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid