Answer the question
In order to leave comments, you need to log in
Can't make a dynamic pointer?
Hello.
We need to make a two-dimensional dynamic array of ID3D11Buffer type pointers (DirectX 11 pointer to buffer).
I write like this:
ID3D11Buffer*** g_pVertexBuffer = new ID3D11Buffer**[];
Answer the question
In order to leave comments, you need to log in
Specify the size in square brackets
class ID3D11Buffer{};//объявим заглушку для примера
using PID3D11Buffer = ID3D11Buffer*;
using PPID3D11Buffer = PID3D11Buffer*;
int main()
{
PPID3D11Buffer* g_pVertexBuffer = new PPID3D11Buffer[42];
}
When you write like this:
The compiler asks you what size block of memory you need to allocate?!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question