How to declare a pointer to a variable as a parameter of a function in C++?
- by Keand64
I have a function that takes a pointer to a D3DXVECTOR3, but I have no reason to declare this beforehand. The most logical solution to me was using new:
Function(
//other parameters,
new D3DXVECTOR3(x, y, 0));
but I don't know how I would go about deleting it, beign intitialized in a function. My next thought was to use the &…