fork download
  1. class Patient {
  2. public:
  3. Patient(int x);
  4. ~Patient();
  5. private:
  6. int* RP;
  7. };
  8.  
  9. Patient::Patient(int x) { RP = new int [x]; }
  10. Patient::~Patient() { delete [] RP; }
  11.  
  12. void f() { Patient p(10); }
  13.  
  14. int main()
  15. {
  16. f();
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 2852KB
stdin
Standard input is empty
stdout

Standard output is empty