|
에러는 안뜨는데 실행 시키면 에러가나면서 실행이 안되네요..
왜 그런지 잘모르겠습니다.
#include <iostream.h>
int main()
{
int *pheap=new int;
if(pheap=NULL)
{
cout << "error!!";
return 0;
}
*pheap=7;
cout << *pheap<< endl;
delete pheap;
pheap=new int;
if(pheap=NULL)
{
cout << "error!!";
return 0;
}
*pheap=9;
cout <<*pheap<< endl;
delete pheap;
return 0;
}
|