class sample
{
public :
sample()
{
cout<<"\n In C'tor";
}
void fun1()
{
cout<<"\n In fun1()";
}
void fun2()
{
cout<<"\n In fun2()";
}
~sample()
{
cout<<"\n In D'tor";
}
};
main()
{
sample *s = new sample;
s->fun1();
delete s;
s = NULL;
s->fun2();
}
Hi all, the given code works successfully.. can any1 tell me ... how above code works..waiting 4 ur quick reply..