fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A
  5. {
  6. private:
  7. int* a_ptr_;
  8. public:
  9. A()=default;
  10. bool compare(){return a_ptr_==nullptr;}
  11. };
  12.  
  13.  
  14. int main() {
  15. // your code goes here
  16. A a;
  17. cout << a.compare() <<endl;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1