unable to use initialised structure during render

Started by
2 comments, last by bigbrother2000 19 years, 4 months ago
hi, i've created a two dimensional array which has individual variables for each member, they have been initialised when directx is initialised and it finds these no problem: (firstmaze.maze[9][7].north = 1) with .north been the variable set to 1, however when i try to retrieve information during the render function of my maze array, if (firstmaze.maze[9][7].north == 1) it says .north must have a class/struct/union type and that firstmaze and maze need defining. Is there a way i access information held in the 2dimensional array during render?
Advertisement
You must make sure the firstmaze object was declared and defined in the same scope of your render function (or must be global) or if u use classes
then it must be a member of the class implementing the render function.
There is nothing that can't be solved. Just people that can't solve it. :)
Please provide some code, if possible.

thanks guys, i put Maze firstmaze; in the public declaration of the class, now the scope is global which means i can access it in the render function, cheers

This topic is closed to new replies.

Advertisement