operator new 重载的问题
void * Chunk::operator new (size_t size, int bytes)
{
if (bytes > MAX_CHUNK_SIZE)
{
cerr<<"trying to make chunk of size "<<bytes<<"\n";
}
void *it = new char[size + bytes];
return it;
}
调用时, Chunk *newchunk = new(100) EST_Chunk;
在DevC++厘可以成功的调Chunk::new,而在vc6里,却编译不通过,我个人觉得以上调用方式,参数不对,vc6不通过是对的,但是,DevC却能执行,是什么原因呢