joke100 come again!
我用你给我的改了一下
char** GenaralPtr(const int h, const int w)
{
char* pByte = NULL;
DWORD* pdwFirst = NULL; // 地址为4字节
malloc(pdwFirst, h * sizeof(DWORD));
char** ppReturn = (char**)pdwFirst;
int i = 0;
for (; i < h; i++)
{
malloc(pByte, w);
pdwFirst[i] = pByte;
}
return ppReturn;
}
作了一个函数GenaralPtr,在另一个函数里用
char** bw1;
bw1=::GenaralPtr(bwh,bww);
编译抱错
D:\Location\LocationView.cpp(363) : error C2039: 'GenaralPtr' : is not a member of '`global namespace''
D:\Location\LocationView.cpp(371) : error C2660: 'malloc' : function does not take 2 parameters
D:\Location\LocationView.cpp(376) : error C2440: '=' : cannot convert from 'char *' to 'unsigned long'