   accessing verts---------directx-----hellllp
  thanks for the response folks ;i'm doing one vertex at a time only because i'm trying to learn how to access and transform the vertices of an object for animation , i aready know how to transform an entire object .( i'm animating a human character and for the timebeing trying to avoid morphing and skeletal technologys ( and shaders))my problem is , my loop , controlled by the number of verts , produces a memory access complaint unless i modify it to cycle about 1/12 that number .also there was one mistake in the copying of the code that caaused confusion .here is another copy .and thanks again for your time .sVertex *pMORG_BODY_VB_POINTER ;DWORD MORG_BODY_VERTSIZE = sizeof(sVertex) ;g_pCLONE_MORG_BODY_Mesh -> LockVertexBuffer( 0 , (void**)&pMORG_BODY_VB_POINTER );DWORD NUMBEROFVERTS = g_pCLONE_MORG_BODY_Mesh -> GetNumVertices() ;for( DWORD i=0; i< NUMBEROFVERTS ; i++ ) {/////////////////LOOP///////////////////////////D3DXVECTOR3 VERTEX = pMORG_BODY_VB_POINTER -> vecPos ;VERTEX.x = 5.0f ;pMORG_BODY_VB_POINTER -> vecPos = VERTEX ;pMORG_BODY_VB_POINTER += MORG_BODY_VERTSIZE ;}/////////////////LOOP///////////////////////////g_pCLONE_MORG_BODY_Mesh -> UnlockVertexBuffer();   
  pMORG_BODY_VB_POINTER += MORG_BODY_VERTSIZE ;I assume you are trying to advance with a specific number of bytes (here, the next vertex in the array), but that's not how that works. A pointer to sVertex can advance sizeof(sVertex) bytes by simply incrementing the pointer. Like this:++pMORG_BODY_VB_POINTER;Doing pMORG_BODY_VB_POINTER += MORG_BODY_VERTSIZE; is the same as advancing pMORG_BODY_VB_POINTER by (MORG_BODY_VERTSIZE * sizeof(sVertex)) bytes, basically jumping ahead MORG_BODY_VERTSIZE vertices.To advance by a custom amount of bytes, first cast the pointer to char*, add the number of bytes then cast it back to the original pointer type.(sVertex*)(((char*)pMORG_BODY_VB_POINTER) + 100)Of course without using C style casts, use the C++ ones.   