64,654
社区成员
发帖
与我相关
我的任务
分享
char* ptr = new char[100];
if(!ptr)
{
cout<<"error"<<endl;
}
if(ptr == NULL)
{
cout<<"NULL"<<endl;
}
if(!ptr)
00FA568D cmp dword ptr [ptr],0
00FA5691 jne main+0DEh (0FA56BEh)
if(ptr == NULL)
00FA56BE cmp dword ptr [ptr],0
00FA56C2 jne main+10Fh (0FA56EFh)
if(NULL == ptr)
{
}
and
//less typing, more readable
if(!meanfull_ptr)
{
}