内存初始化问题
Posted www
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了内存初始化问题相关的知识,希望对你有一定的参考价值。
INT* pData2 = new INT[nPixelCount];
memset(pData2, 0, sizeof(INT)*nPixelCount);
memcpy(pData2, pData, sizeof(INT)*nPixelCount);
-------------------------------------------------------------------------
WCHAR* z_pDriveStr = new WCHAR[z_szAllDriveStr + sizeof(_T(" "))];
if(NULL == z_pDriveStr)
{
goto _RESULT;
}
ZeroMemory(z_pDriveStr, z_szAllDriveStr + sizeof(_T(" ")));
-------------------------------------------------------------------
typedef struct _itemData
{
HTREEITEM hItem;
CString strPath;
CString ItemName;
CString UpTime;;
ULONGLONG Size;
DWORD CheckState;
_itemData()
{
hItem = NULL;
strPath = _T("");
ItemName = _T("");
UpTime = _T("");
Size = 0;
CheckState = DUICHECKBOX_UNCHECKED;
}
}*ITEM_DATAPTR,ITEM_DATA;
以上是关于内存初始化问题的主要内容,如果未能解决你的问题,请参考以下文章