   How to redirect a pointer?
  I have a LPDIRECT3DVERTEXBUFFER9* and I want to lock it. I cannot use VertexBuffer->Lock() because my compiler says "left of '->Lock' must point to class/struct/union" and then crashes with an error. How do I need to use the ampersand & operator or the asterick * operator in this case to resolve a pointer of a vertex buffer down into a vertex buffer object with which I can call functions from? All help is appreciated.   
  (*VertexBuffer)->Lock(...);First dereference the first pointer to get the second one, then call it's Lock function. Though I don't think you need to be using a double pointer in this case.   ;  "LP" means "Local Pointer", so if you've got a pointer to that, then you've essentially got a pointer to a pointer.To call a member of such a monster, you need to dereference twice, then use the . operator. Or dereference once, then use the -> operator.LPDIRECT3DVERTEXBUFFER9* _pie;(**_pie).Lock();(*_pie)->Lock();I use the latter syntax myself, but its all personal preference.   ;  Thanks, it works now!   ;  Just some advice: I can think of no good reason to have a pointer to an LPDIRECT3DVERTEXBUFFER9.  Once you know that LPDIRECT3DVERTEXBUFFER9 is just a typedef'ed pointer, you can just pass around the LPDIRECT3DVERTEXBUFFER9 directly.  Passing around the pointer to the LPDIRECT3DVERTEXBUFFER9 could be dangerous, too, depending on where and how you store the original LPDIRECT3DVERTEXBUFFER9.   ;Quote:Original post by BeanDogJust some advice: I can think of no good reason to have a pointer to an LPDIRECT3DVERTEXBUFFER9.  Once you know that LPDIRECT3DVERTEXBUFFER9 is just a typedef'ed pointer, you can just pass around the LPDIRECT3DVERTEXBUFFER9 directly.  Passing around the pointer to the LPDIRECT3DVERTEXBUFFER9 could be dangerous, too, depending on where and how you store the original LPDIRECT3DVERTEXBUFFER9.I've used a pointer to an LPDIRECT3DVERTEXBUFFER9 before - there are some cases where you may need it. Of course, chances are you've got a bad design, unless you're using a "mother" class to instantiate an abstract "rendering device", similar to the LPDIRECT3D9->CreateDevice() model of thought. Although I only use it because I'm using an API-independant library... I'll be quiet now.Point is, there are places (place?) where you should/need to use it.   