I get the error in the title in the following code:
std::vector<short> GetIndicesFromID3DXMesh(ID3DXMesh* model)
{
//LPVOID * ppData;
DWORD stride = sizeof(short);
BYTE* ibptr = NULL;
short* indices = new short[model->GetNumFaces() * 3];
std::vector<short> copy;
model->LockIndexBuffer(0, (LPVOID*)&indices);
for(size_t i = 0; i < model->GetNumFaces() * 3; i++)
{
copy.push_back(indices[i]);
}
model->UnlockIndexBuffer();
delete []indices;
return copy;
}
At the line delete[]indices
I don't know why I get it, I don't know how I get it, can i not get it?