I\'m using this tutorial, but when I compile the code from it:
D3DXMatrixLookAtLH(
&matView,
&D3DXVECTOR3(0.0f, 10.0f, 0.0f), // warning C423
You are taking the address of a temporary. You can't do that. Declare your vectors beforehand:
D3DXVECTOR3 a(0.0f, 10.0f, 0.0f)
,b(0.0f, 0.0f, 0.0f)
,c(0.0f, 0.0f, 1.0f);
D3DXMatrixLookAtLH(&matView, &a, &b, &c);
Note that I ignored your "without additional lines of code?" requirement, because that's a stupid requirement.