Implementation of Destructors C++|| OOP
#include<bits/stdc++.h>
using namespace std;
class test
{
public :
test(){
cout<<"I am in constructors\n";
}
~test(){
cout<<"I am in Destructors\n";
}
void display()
{
cout<<"I am in display\n";
}
};
int main()
{
test t1;
t1.display();
test t2;
return 0;
}
0 Comments