初学遇问题,求助各大神
水平低,没办法,求助#include<alloc.h>
#include<string.h>
class Blank
{
public:
Blanks(){}
void *operator new(size_t stAllocateBlock,char chInit);
};
void *Blanks::operator new(size_t stAllocateBlock,char chInit)
{
void *pvTemp=malloc();
if(pvTemp!=0)
memset(pvTemp,chInit,stAllocateBlock);
return pvTemp;
}
int main()
{ Blanks*a5=new(0xa5)Blanks;//创建对象Blanks,并且初试化为0xa5
return!=0;
}
错误fatal error C1083: Cannot open include file: 'alloc.h': No such file or directory
执行 cl.exe 时出错.