fork download
  1. #include <iostream>
  2.  
  3. class Test {
  4. public:
  5. void foo() {
  6. if (!this) {
  7. std::cout<<"Blah!"<<std::endl;
  8. return;
  9. }
  10. std::cout<<"Foo!"<<std::endl;
  11. }
  12. };
  13.  
  14. int main() {
  15. Test* t = NULL;
  16. t->foo();
  17. return 0;
  18. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
Blah!