Jump to content
  • Advertisement
Sign in to follow this  
jinuuchukuu

Acces violation of an array[][][][]

This topic is 4240 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 trying to acces a array short myArray[][][][] with the help of another array short myIndex[][][], in an if conditional, myArray being in a typedef struct myStruct: if(myStruct.array[index[0]][index[1]][index[2]][x]==y){} An goddamn acces violation occurs when the class where the fonction belongs is called.... Arrays limited to 3 colomns in Virtual C++ 6 ?!? My program being a conversion from apple's xcode... Somebody, please, help !! advanced thanx

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Quote:
Original post by jinuuchukuu
Arrays limited to 3 colomns in Virtual C++ 6 ?!?


Not as far as I know. Though in general I'd recommend just sticking to 1 dimensional arrays and dealing with the row/column layout yourself.

Use the debugger to find out what the values in your indices array are as they are used to index your other array.

The access violation is (probably) caused by you trying to access memory outside the bounds of your array. If your indices are outside the valid range then using them to index the main array will cause an access violation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!