Archived

This topic is now archived and is closed to further replies.

Access violation how to access...

This topic is 5034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm getting an access violation when trying to copy vertices over from one vertex array to another. The line of code is:
nodeVerts[0].verts[0] = vertArray.verts[0];  
nodeVerts and vertArray are both VertexArray's... the .verts is a struct, defined in VertexArray as: Vertex *verts; Now, I'm able to access other variables using similiar code (ie, nodeVerts[0].numberOfVerts = 10; ), so I'm pretty sure something is wrong with my access to the struct array. What am I doin' wrong? EDIT: code made a smiley face [edited by - ichor on April 5, 2004 11:31:34 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quick guess...

you say Vertex *verts

did you allocate verts?

Share this post


Link to post
Share on other sites
Yep, that was it...when using it in a different area, I allocate and memset() it... forgot to this time. Whoops.

Thanks!

Share this post


Link to post
Share on other sites