Hi, here is the code:
The pointer pt still call the function even it is deleted, what is reason? ThanksCode:#include <iostream.h>
class A
{
private:
int i;
public:
void test(){cout<<"test"<<endl;}
};
int main()
{
A* pt = new A;
delete pt;
pt = NULL;
cout<<pt<<endl;
pt->test();
return 1;
}