[求助]关于内存动态分配的问题
#include<iostream>
using namespace std;
int fun();
void main()
{
int a=fun();
cout<<"the value of a is :"<<a;
}
int fun()
{
int *p=new int (5);
return *p;
}
//不知道程序错在哪里?
有哪位能说一下在使用指针时应避免什么样的问题.......谢谢

英者自知,雄者自胜