(2)多行宏定义需要使用使用转义字符’\’连接。...void* operator new(size_t size, const char *file, int line,const char *function) throw (std::bad_alloc...*function) throw (std::bad_alloc){
void * ptr=malloc(size);
printf("&&%s:%d:%s:new[](size=%u...)=%p\n",file,line,function,size,ptr);
if(ptr==NULL)
throw std::bad_alloc();
return ptr...printf("&&%s:%d:%s()",__FILE__,__LINE__,__FUNCTION__);\
}),delete
注意事项:
(1)delete或者delete[]打印内存地址时,