hello friends ,
I have written a C ++ code . it will be used to call thru VB.
But here the destructor isnt dereferencing after the " delete " operator .
Plss just check the code and plss tell me whass wrong in it ?
Why isnt the destructor dereferencing after the delete operator ?
Here's the code below


#include <stdlib.h>
#include <iostream>
//using namespace std;

class hello{
int *num ;
public : void trip();

public :

//constructor
hello()
{
num = new int;
cout<<"hello !! world\n";
*num = 20;
cout<<*num<<endl;
}
//destructor
~hello()
{
delete num;
cout<<"deleting"<<endl;
cout<<*num<<endl;

}
};

void hello:: trip(){
cout<<"hello again"<<endl;
cout<<*num<<endl;

}

//main file
int main(int argc, char *argv[])
{
hello *hh = new hello ;
delete hh;
hh->trip();
flush;
return 0;
}

waiting for reply
Prasad