fork download
  1. #include <iostream>
  2.  
  3. struct Printer
  4. {
  5. int x = 7;
  6. void print()
  7. {
  8. std::cout << "Printer " << x << std::endl;
  9. }
  10. };
  11.  
  12. int main()
  13. {
  14. Printer *p = nullptr;
  15. p->print();
  16. }
  17.  
Runtime error #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout

Standard output is empty