BurningSheep was helping me solve a memory issue. I was using up the stack instead of utilising the heap(I think)
All my variable definitions plus the structs which were giving me problems are in a MyGame.h file containing the definition of the MyGame class, all the function prototypes and variable definitions.
I cannot put the following line in this section
planet_data *planets = new planet_data[2000]; as I can only define the variables not give them a value. I get error C2258: illegal pure syntax, must be '= 0'
If I put the new statements in the MyGame init function then other functions cannot access them.
My code is split across various source files as eventually the game will be very big & I can;t keep it inside one source. This may have something to do with it.
Up till now I was manageing by creating the variable in the MyGame.h & giving it a value in the init function but I don;t see how to do this with 'new'