Advertisement

Access violation how to access...

Started by April 05, 2004 10:30 PM
1 comment, last by ichor 20 years, 11 months ago
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]
Quick guess...

you say Vertex *verts

did you allocate verts?
Advertisement
Yep, that was it...when using it in a different area, I allocate and memset() it... forgot to this time. Whoops.

Thanks!

This topic is closed to new replies.

Advertisement