运行以下程序,猜猜会出现什么问题?
#include <iostream>
#include <string>
using namespace std;
class AAA{
public:
AAA(){
p = this;
}
~AAA(){
if (p)
delete p;
}
AAA *p;
};
int main(int argc, char* argv[])
{
AAA* tmp = new AAA();
AAA a;
getchar();
return 0;
}