Answers for "destructors in C++"

C++
0

destructors in C++

class A{
 private:
  int val;
 public:
  A(int x){           
   val=x;
  }
  A(){                
  }
  ~A(){                  //destructor
  }
}
int main(){
 A a(3);     
 return 0;
}
Posted by: Guest on October-29-2021

Browse Popular Code Answers by Language